Skip to content

Commit 587c5db

Browse files
authored
Merge branch 'master' into emargolis/feature/fix-lighting-app-zap-events
2 parents 7976d46 + 6c1cb33 commit 587c5db

File tree

174 files changed

+5122
-3654
lines changed

Some content is hidden

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

174 files changed

+5122
-3654
lines changed

.github/workflows/lint.yml

+10
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,13 @@ jobs:
203203
if: always()
204204
run: |
205205
git grep -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
206+
207+
# git grep exits with 0 if it finds a match, but we want
208+
# to fail (exit nonzero) on match. And we want to exclude this file,
209+
# to avoid our grep regexp matching itself, as well as excluding the files
210+
# that implement the type-safe accessors, attribute writing from the wire, and some
211+
# Pigweed RPC code that seems hard to update.
212+
- name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
213+
if: always()
214+
run: |
215+
git grep -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0

BUILD.gn

+1-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
120120
}
121121

122122
pw_python_pip_install("pip_install_matter_packages") {
123-
packages = [
124-
"//examples/common/pigweed/rpc_console:chip_rpc_distribution",
125-
"//scripts:matter_yamltests_distribution",
126-
]
123+
packages = [ "//examples/common/pigweed/rpc_console:chip_rpc_distribution" ]
127124
}
128125

129126
# Python packages installed during bootstrap.

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

+6-23
Original file line numberDiff line numberDiff line change
@@ -1210,21 +1210,21 @@ server cluster NetworkCommissioning = 49 {
12101210
}
12111211

12121212
server cluster DiagnosticLogs = 50 {
1213-
enum LogsIntent : ENUM8 {
1213+
enum IntentEnum : ENUM8 {
12141214
kEndUserSupport = 0;
12151215
kNetworkDiag = 1;
12161216
kCrashLogs = 2;
12171217
}
12181218

1219-
enum LogsStatus : ENUM8 {
1219+
enum StatusEnum : ENUM8 {
12201220
kSuccess = 0;
12211221
kExhausted = 1;
12221222
kNoLogs = 2;
12231223
kBusy = 3;
12241224
kDenied = 4;
12251225
}
12261226

1227-
enum LogsTransferProtocol : ENUM8 {
1227+
enum TransferProtocolEnum : ENUM8 {
12281228
kResponsePayload = 0;
12291229
kBdx = 1;
12301230
}
@@ -1237,9 +1237,9 @@ server cluster DiagnosticLogs = 50 {
12371237
readonly attribute int16u clusterRevision = 65533;
12381238

12391239
request struct RetrieveLogsRequestRequest {
1240-
LogsIntent intent = 0;
1241-
LogsTransferProtocol requestedProtocol = 1;
1242-
OCTET_STRING<32> transferFileDesignator = 2;
1240+
IntentEnum intent = 0;
1241+
TransferProtocolEnum requestedProtocol = 1;
1242+
optional CHAR_STRING<32> transferFileDesignator = 2;
12431243
}
12441244

12451245
command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0;
@@ -4449,8 +4449,6 @@ endpoint 0 {
44494449
}
44504450

44514451
server cluster ThreadNetworkDiagnostics {
4452-
emits event ConnectionStatus;
4453-
emits event NetworkFaultChange;
44544452
callback attribute channel;
44554453
callback attribute routingRole;
44564454
callback attribute networkName;
@@ -4708,8 +4706,6 @@ endpoint 1 {
47084706
}
47094707

47104708
server cluster Actions {
4711-
emits event StateChanged;
4712-
emits event ActionFailed;
47134709
callback attribute actionList;
47144710
callback attribute endpointLists;
47154711
callback attribute setupURL;
@@ -4751,7 +4747,6 @@ endpoint 1 {
47514747
}
47524748

47534749
server cluster BooleanState {
4754-
emits event StateChange;
47554750
ram attribute stateValue;
47564751
ram attribute featureMap;
47574752
ram attribute clusterRevision default = 1;
@@ -4852,18 +4847,6 @@ endpoint 1 {
48524847
}
48534848

48544849
server cluster PumpConfigurationAndControl {
4855-
emits event SupplyVoltageLow;
4856-
emits event SupplyVoltageHigh;
4857-
emits event PowerMissingPhase;
4858-
emits event SystemPressureLow;
4859-
emits event SystemPressureHigh;
4860-
emits event DryRunning;
4861-
emits event MotorTemperatureHigh;
4862-
emits event PumpMotorFatalFailure;
4863-
emits event ElectronicTemperatureHigh;
4864-
emits event PumpBlocked;
4865-
emits event SensorFailure;
4866-
emits event ElectronicNonFatalFailure;
48674850
ram attribute maxPressure;
48684851
ram attribute maxSpeed;
48694852
ram attribute maxFlow;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

-127
Original file line numberDiff line numberDiff line change
@@ -4885,22 +4885,6 @@
48854885
"maxInterval": 65344,
48864886
"reportableChange": 0
48874887
}
4888-
],
4889-
"events": [
4890-
{
4891-
"name": "ConnectionStatus",
4892-
"code": 0,
4893-
"mfgCode": null,
4894-
"side": "server",
4895-
"included": 1
4896-
},
4897-
{
4898-
"name": "NetworkFaultChange",
4899-
"code": 1,
4900-
"mfgCode": null,
4901-
"side": "server",
4902-
"included": 1
4903-
}
49044888
]
49054889
},
49064890
{
@@ -10746,22 +10730,6 @@
1074610730
"maxInterval": 65344,
1074710731
"reportableChange": 0
1074810732
}
10749-
],
10750-
"events": [
10751-
{
10752-
"name": "StateChanged",
10753-
"code": 0,
10754-
"mfgCode": null,
10755-
"side": "server",
10756-
"included": 1
10757-
},
10758-
{
10759-
"name": "ActionFailed",
10760-
"code": 1,
10761-
"mfgCode": null,
10762-
"side": "server",
10763-
"included": 1
10764-
}
1076510733
]
1076610734
},
1076710735
{
@@ -12738,15 +12706,6 @@
1273812706
"maxInterval": 65534,
1273912707
"reportableChange": 0
1274012708
}
12741-
],
12742-
"events": [
12743-
{
12744-
"name": "StateChange",
12745-
"code": 0,
12746-
"mfgCode": null,
12747-
"side": "server",
12748-
"included": 1
12749-
}
1275012709
]
1275112710
},
1275212711
{
@@ -14959,92 +14918,6 @@
1495914918
"maxInterval": 65344,
1496014919
"reportableChange": 0
1496114920
}
14962-
],
14963-
"events": [
14964-
{
14965-
"name": "SupplyVoltageLow",
14966-
"code": 0,
14967-
"mfgCode": null,
14968-
"side": "server",
14969-
"included": 1
14970-
},
14971-
{
14972-
"name": "SupplyVoltageHigh",
14973-
"code": 1,
14974-
"mfgCode": null,
14975-
"side": "server",
14976-
"included": 1
14977-
},
14978-
{
14979-
"name": "PowerMissingPhase",
14980-
"code": 2,
14981-
"mfgCode": null,
14982-
"side": "server",
14983-
"included": 1
14984-
},
14985-
{
14986-
"name": "SystemPressureLow",
14987-
"code": 3,
14988-
"mfgCode": null,
14989-
"side": "server",
14990-
"included": 1
14991-
},
14992-
{
14993-
"name": "SystemPressureHigh",
14994-
"code": 4,
14995-
"mfgCode": null,
14996-
"side": "server",
14997-
"included": 1
14998-
},
14999-
{
15000-
"name": "DryRunning",
15001-
"code": 5,
15002-
"mfgCode": null,
15003-
"side": "server",
15004-
"included": 1
15005-
},
15006-
{
15007-
"name": "MotorTemperatureHigh",
15008-
"code": 6,
15009-
"mfgCode": null,
15010-
"side": "server",
15011-
"included": 1
15012-
},
15013-
{
15014-
"name": "PumpMotorFatalFailure",
15015-
"code": 7,
15016-
"mfgCode": null,
15017-
"side": "server",
15018-
"included": 1
15019-
},
15020-
{
15021-
"name": "ElectronicTemperatureHigh",
15022-
"code": 8,
15023-
"mfgCode": null,
15024-
"side": "server",
15025-
"included": 1
15026-
},
15027-
{
15028-
"name": "PumpBlocked",
15029-
"code": 9,
15030-
"mfgCode": null,
15031-
"side": "server",
15032-
"included": 1
15033-
},
15034-
{
15035-
"name": "SensorFailure",
15036-
"code": 10,
15037-
"mfgCode": null,
15038-
"side": "server",
15039-
"included": 1
15040-
},
15041-
{
15042-
"name": "ElectronicNonFatalFailure",
15043-
"code": 11,
15044-
"mfgCode": null,
15045-
"side": "server",
15046-
"included": 1
15047-
}
1504814921
]
1504914922
},
1505014923
{

examples/all-clusters-app/all-clusters-common/include/static-supported-modes-manager.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class StaticSupportedModesManager : public chip::app::Clusters::ModeSelect::Supp
5656

5757
SupportedModesManager::ModeOptionsProvider getModeOptionsProvider(EndpointId endpointId) const override;
5858

59-
EmberAfStatus getModeOptionByMode(EndpointId endpointId, uint8_t mode, const ModeOptionStructType ** dataPtr) const override;
59+
Protocols::InteractionModel::Status getModeOptionByMode(EndpointId endpointId, uint8_t mode,
60+
const ModeOptionStructType ** dataPtr) const override;
6061

6162
~StaticSupportedModesManager(){};
6263

examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ using namespace std;
44
using namespace chip;
55
using namespace chip::app::Clusters;
66
using namespace chip::app::Clusters::ModeSelect;
7+
using chip::Protocols::InteractionModel::Status;
78

89
using ModeOptionStructType = Structs::ModeOptionStruct::Type;
910
using SemanticTag = Structs::SemanticTagStruct::Type;
@@ -51,13 +52,13 @@ SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeO
5152
return ModeOptionsProvider(nullptr, nullptr);
5253
}
5354

54-
EmberAfStatus StaticSupportedModesManager::getModeOptionByMode(unsigned short endpointId, unsigned char mode,
55-
const ModeOptionStructType ** dataPtr) const
55+
Status StaticSupportedModesManager::getModeOptionByMode(unsigned short endpointId, unsigned char mode,
56+
const ModeOptionStructType ** dataPtr) const
5657
{
5758
auto modeOptionsProvider = this->getModeOptionsProvider(endpointId);
5859
if (modeOptionsProvider.begin() == nullptr)
5960
{
60-
return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER;
61+
return Status::UnsupportedCluster;
6162
}
6263
auto * begin = this->getModeOptionsProvider(endpointId).begin();
6364
auto * end = this->getModeOptionsProvider(endpointId).end();
@@ -68,11 +69,11 @@ EmberAfStatus StaticSupportedModesManager::getModeOptionByMode(unsigned short en
6869
if (modeOption.mode == mode)
6970
{
7071
*dataPtr = &modeOption;
71-
return EMBER_ZCL_STATUS_SUCCESS;
72+
return Status::Success;
7273
}
7374
}
7475
emberAfPrintln(EMBER_AF_PRINT_DEBUG, "Cannot find the mode %u", mode);
75-
return EMBER_ZCL_STATUS_INVALID_COMMAND;
76+
return Status::InvalidCommand;
7677
}
7778

7879
const ModeSelect::SupportedModesManager * ModeSelect::getSupportedModesManager()

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

+6-10
Original file line numberDiff line numberDiff line change
@@ -1089,21 +1089,21 @@ server cluster NetworkCommissioning = 49 {
10891089
}
10901090

10911091
server cluster DiagnosticLogs = 50 {
1092-
enum LogsIntent : ENUM8 {
1092+
enum IntentEnum : ENUM8 {
10931093
kEndUserSupport = 0;
10941094
kNetworkDiag = 1;
10951095
kCrashLogs = 2;
10961096
}
10971097

1098-
enum LogsStatus : ENUM8 {
1098+
enum StatusEnum : ENUM8 {
10991099
kSuccess = 0;
11001100
kExhausted = 1;
11011101
kNoLogs = 2;
11021102
kBusy = 3;
11031103
kDenied = 4;
11041104
}
11051105

1106-
enum LogsTransferProtocol : ENUM8 {
1106+
enum TransferProtocolEnum : ENUM8 {
11071107
kResponsePayload = 0;
11081108
kBdx = 1;
11091109
}
@@ -1116,9 +1116,9 @@ server cluster DiagnosticLogs = 50 {
11161116
readonly attribute int16u clusterRevision = 65533;
11171117

11181118
request struct RetrieveLogsRequestRequest {
1119-
LogsIntent intent = 0;
1120-
LogsTransferProtocol requestedProtocol = 1;
1121-
OCTET_STRING<32> transferFileDesignator = 2;
1119+
IntentEnum intent = 0;
1120+
TransferProtocolEnum requestedProtocol = 1;
1121+
optional CHAR_STRING<32> transferFileDesignator = 2;
11221122
}
11231123

11241124
command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0;
@@ -3850,8 +3850,6 @@ endpoint 1 {
38503850
}
38513851

38523852
server cluster Actions {
3853-
emits event StateChanged;
3854-
emits event ActionFailed;
38553853
callback attribute actionList;
38563854
callback attribute endpointLists;
38573855
ram attribute featureMap;
@@ -3867,7 +3865,6 @@ endpoint 1 {
38673865
}
38683866

38693867
server cluster Switch {
3870-
emits event SwitchLatched;
38713868
ram attribute numberOfPositions default = 2;
38723869
ram attribute currentPosition;
38733870
ram attribute featureMap default = 1;
@@ -3887,7 +3884,6 @@ endpoint 1 {
38873884
}
38883885

38893886
server cluster BooleanState {
3890-
emits event StateChange;
38913887
ram attribute stateValue;
38923888
ram attribute featureMap;
38933889
ram attribute clusterRevision default = 1;

0 commit comments

Comments
 (0)