Skip to content

Commit c54a103

Browse files
Regenerated zap files
1 parent f065566 commit c54a103

File tree

27 files changed

+183
-38
lines changed

27 files changed

+183
-38
lines changed

examples/contact-sensor-app/nxp/zap/contact-sensor-app.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,10 @@ cluster IcdManagement = 70 {
13371337
optional octet_string<16> verificationKey = 1;
13381338
}
13391339

1340+
request struct StayActiveRequestRequest {
1341+
int32u stayActiveDuration = 0;
1342+
}
1343+
13401344
response struct StayActiveResponse = 4 {
13411345
int32u promisedActiveDuration = 0;
13421346
}
@@ -1346,7 +1350,7 @@ cluster IcdManagement = 70 {
13461350
/** Unregister a client from an end device */
13471351
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
13481352
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1349-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1353+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
13501354
}
13511355

13521356
endpoint 0 {

examples/light-switch-app/light-switch-common/light-switch-app.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,10 @@ cluster IcdManagement = 70 {
20072007
optional octet_string<16> verificationKey = 1;
20082008
}
20092009

2010+
request struct StayActiveRequestRequest {
2011+
int32u stayActiveDuration = 0;
2012+
}
2013+
20102014
response struct StayActiveResponse = 4 {
20112015
int32u promisedActiveDuration = 0;
20122016
}
@@ -2016,7 +2020,7 @@ cluster IcdManagement = 70 {
20162020
/** Unregister a client from an end device */
20172021
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
20182022
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
2019-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
2023+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
20202024
}
20212025

20222026
/** Attributes and commands for scene configuration and manipulation. */

examples/light-switch-app/qpg/zap/switch.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,10 @@ cluster IcdManagement = 70 {
18041804
optional octet_string<16> verificationKey = 1;
18051805
}
18061806

1807+
request struct StayActiveRequestRequest {
1808+
int32u stayActiveDuration = 0;
1809+
}
1810+
18071811
response struct StayActiveResponse = 4 {
18081812
int32u promisedActiveDuration = 0;
18091813
}
@@ -1813,7 +1817,7 @@ cluster IcdManagement = 70 {
18131817
/** Unregister a client from an end device */
18141818
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
18151819
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1816-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1820+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
18171821
}
18181822

18191823
/** Attributes and commands for scene configuration and manipulation. */

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,10 @@ cluster IcdManagement = 70 {
14651465
optional octet_string<16> verificationKey = 1;
14661466
}
14671467

1468+
request struct StayActiveRequestRequest {
1469+
int32u stayActiveDuration = 0;
1470+
}
1471+
14681472
response struct StayActiveResponse = 4 {
14691473
int32u promisedActiveDuration = 0;
14701474
}
@@ -1474,7 +1478,7 @@ cluster IcdManagement = 70 {
14741478
/** Unregister a client from an end device */
14751479
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
14761480
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1477-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1481+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
14781482
}
14791483

14801484
endpoint 0 {

examples/lock-app/lock-common/lock-app.matter

+11-1
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,10 @@ cluster IcdManagement = 70 {
18251825
optional octet_string<16> verificationKey = 1;
18261826
}
18271827

1828+
request struct StayActiveRequestRequest {
1829+
int32u stayActiveDuration = 0;
1830+
}
1831+
18281832
response struct StayActiveResponse = 4 {
18291833
int32u promisedActiveDuration = 0;
18301834
}
@@ -1834,7 +1838,7 @@ cluster IcdManagement = 70 {
18341838
/** Unregister a client from an end device */
18351839
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
18361840
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1837-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1841+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
18381842
}
18391843

18401844
/** An interface to a generic way to secure a door */
@@ -2888,6 +2892,12 @@ endpoint 0 {
28882892
callback attribute activeModeThreshold;
28892893
ram attribute featureMap default = 0x0000;
28902894
ram attribute clusterRevision default = 2;
2895+
2896+
handle command RegisterClient;
2897+
handle command RegisterClientResponse;
2898+
handle command UnregisterClient;
2899+
handle command StayActiveRequest;
2900+
handle command StayActiveResponse;
28912901
}
28922902
}
28932903
endpoint 1 {

examples/lock-app/lock-common/lock-app.zap

+46-4
Original file line numberDiff line numberDiff line change
@@ -2412,10 +2412,10 @@
24122412
"side": "server",
24132413
"type": "bitmap32",
24142414
"included": 1,
2415-
"storageOption": "RAM",
2415+
"storageOption": "External",
24162416
"singleton": 0,
24172417
"bounded": 0,
2418-
"defaultValue": "0",
2418+
"defaultValue": null,
24192419
"reportable": 1,
24202420
"minInterval": 1,
24212421
"maxInterval": 65534,
@@ -2428,10 +2428,10 @@
24282428
"side": "server",
24292429
"type": "int16u",
24302430
"included": 1,
2431-
"storageOption": "RAM",
2431+
"storageOption": "External",
24322432
"singleton": 0,
24332433
"bounded": 0,
2434-
"defaultValue": "0x0002",
2434+
"defaultValue": null,
24352435
"reportable": 1,
24362436
"minInterval": 0,
24372437
"maxInterval": 65344,
@@ -4939,6 +4939,48 @@
49394939
"define": "ICD_MANAGEMENT_CLUSTER",
49404940
"side": "server",
49414941
"enabled": 1,
4942+
"commands": [
4943+
{
4944+
"name": "RegisterClient",
4945+
"code": 0,
4946+
"mfgCode": null,
4947+
"source": "client",
4948+
"isIncoming": 1,
4949+
"isEnabled": 1
4950+
},
4951+
{
4952+
"name": "RegisterClientResponse",
4953+
"code": 1,
4954+
"mfgCode": null,
4955+
"source": "server",
4956+
"isIncoming": 0,
4957+
"isEnabled": 1
4958+
},
4959+
{
4960+
"name": "UnregisterClient",
4961+
"code": 2,
4962+
"mfgCode": null,
4963+
"source": "client",
4964+
"isIncoming": 1,
4965+
"isEnabled": 1
4966+
},
4967+
{
4968+
"name": "StayActiveRequest",
4969+
"code": 3,
4970+
"mfgCode": null,
4971+
"source": "client",
4972+
"isIncoming": 1,
4973+
"isEnabled": 1
4974+
},
4975+
{
4976+
"name": "StayActiveResponse",
4977+
"code": 4,
4978+
"mfgCode": null,
4979+
"source": "server",
4980+
"isIncoming": 0,
4981+
"isEnabled": 1
4982+
}
4983+
],
49424984
"attributes": [
49434985
{
49444986
"name": "IdleModeDuration",

examples/lock-app/qpg/zap/lock.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,10 @@ cluster IcdManagement = 70 {
14811481
optional octet_string<16> verificationKey = 1;
14821482
}
14831483

1484+
request struct StayActiveRequestRequest {
1485+
int32u stayActiveDuration = 0;
1486+
}
1487+
14841488
response struct StayActiveResponse = 4 {
14851489
int32u promisedActiveDuration = 0;
14861490
}
@@ -1490,7 +1494,7 @@ cluster IcdManagement = 70 {
14901494
/** Unregister a client from an end device */
14911495
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
14921496
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1493-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1497+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
14941498
}
14951499

14961500
/** An interface to a generic way to secure a door */

examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,10 @@ cluster IcdManagement = 70 {
18011801
optional octet_string<16> verificationKey = 1;
18021802
}
18031803

1804+
request struct StayActiveRequestRequest {
1805+
int32u stayActiveDuration = 0;
1806+
}
1807+
18041808
response struct StayActiveResponse = 4 {
18051809
int32u promisedActiveDuration = 0;
18061810
}
@@ -1810,7 +1814,7 @@ cluster IcdManagement = 70 {
18101814
/** Unregister a client from an end device */
18111815
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
18121816
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1813-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1817+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
18141818
}
18151819

18161820
/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */

examples/window-app/common/window-app.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,10 @@ cluster IcdManagement = 70 {
18991899
optional octet_string<16> verificationKey = 1;
19001900
}
19011901

1902+
request struct StayActiveRequestRequest {
1903+
int32u stayActiveDuration = 0;
1904+
}
1905+
19021906
response struct StayActiveResponse = 4 {
19031907
int32u promisedActiveDuration = 0;
19041908
}
@@ -1908,7 +1912,7 @@ cluster IcdManagement = 70 {
19081912
/** Unregister a client from an end device */
19091913
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
19101914
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
1911-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
1915+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
19121916
}
19131917

19141918
/** Provides an interface for controlling and adjusting automatic window coverings. */

src/app/tests/TestICDManager.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,9 @@ class TestICDManager
544544
/* Test that verifies the logic of the ICDManager when it receives a StayActiveRequest*/
545545
static void TestICDMStayActive(nlTestSuite * aSuite, void * aContext)
546546
{
547-
TestContext * ctx = static_cast<TestContext *>(aContext);
548-
ICDNotifier notifier = ICDNotifier::GetInstance();
547+
TestContext * ctx = static_cast<TestContext *>(aContext);
548+
ICDNotifier notifier = ICDNotifier::GetInstance();
549+
ICDConfigurationData & icdConfigData = ICDConfigurationData::GetInstance();
549550

550551
// Verify That ICDManager starts in Idle
551552
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode);
@@ -606,8 +607,8 @@ class TestICDManager
606607
// confirm the promised time is the same as the requested time
607608
NL_TEST_ASSERT(aSuite, stayActivePromisedMs == 30000);
608609

609-
// Advance time by the duration of the stay active request - 10000 ms
610-
AdvanceClockAndRunEventLoop(ctx, System::Clock::Milliseconds32(stayActiveRequestedMs) - 10000_ms);
610+
// Advance time by the duration of the stay active request - 20000 ms
611+
AdvanceClockAndRunEventLoop(ctx, System::Clock::Milliseconds32(stayActiveRequestedMs) - 20000_ms);
611612
// Confirm ICD manager is in active mode, we should have 20000 seconds left at that point
612613
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
613614

@@ -632,6 +633,7 @@ static const nlTest sTests[] = {
632633
NL_TEST_DEF("TestKeepActivemodeRequests", TestICDManager::TestKeepActivemodeRequests),
633634
NL_TEST_DEF("TestICDMRegisterUnregisterEvents", TestICDManager::TestICDMRegisterUnregisterEvents),
634635
NL_TEST_DEF("TestICDCounter", TestICDManager::TestICDCounter),
636+
NL_TEST_DEF("TestICDStayActive", TestICDManager::TestICDMStayActive),
635637
NL_TEST_SENTINEL(),
636638
};
637639

src/controller/data_model/controller-clusters.matter

+5-1
Original file line numberDiff line numberDiff line change
@@ -2740,6 +2740,10 @@ cluster IcdManagement = 70 {
27402740
optional octet_string<16> verificationKey = 1;
27412741
}
27422742

2743+
request struct StayActiveRequestRequest {
2744+
int32u stayActiveDuration = 0;
2745+
}
2746+
27432747
response struct StayActiveResponse = 4 {
27442748
int32u promisedActiveDuration = 0;
27452749
}
@@ -2749,7 +2753,7 @@ cluster IcdManagement = 70 {
27492753
/** Unregister a client from an end device */
27502754
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
27512755
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
2752-
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
2756+
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
27532757
}
27542758

27552759
/** This cluster supports creating a simple timer functionality. */

src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -18170,14 +18170,18 @@ public void onResponse(StructType invokeStructValue) {
1817018170
}}, commandId, commandArgs, timedInvokeTimeoutMs);
1817118171
}
1817218172

18173-
public void stayActiveRequest(StayActiveResponseCallback callback) {
18174-
stayActiveRequest(callback, 0);
18173+
public void stayActiveRequest(StayActiveResponseCallback callback, Long stayActiveDuration) {
18174+
stayActiveRequest(callback, stayActiveDuration, 0);
1817518175
}
1817618176

18177-
public void stayActiveRequest(StayActiveResponseCallback callback, int timedInvokeTimeoutMs) {
18177+
public void stayActiveRequest(StayActiveResponseCallback callback, Long stayActiveDuration, int timedInvokeTimeoutMs) {
1817818178
final long commandId = 3L;
1817918179

1818018180
ArrayList<StructElement> elements = new ArrayList<>();
18181+
final long stayActiveDurationFieldID = 0L;
18182+
BaseTLVType stayActiveDurationtlvValue = new UIntType(stayActiveDuration);
18183+
elements.add(new StructElement(stayActiveDurationFieldID, stayActiveDurationtlvValue));
18184+
1818118185
StructType commandArgs = new StructType(elements);
1818218186
invoke(new InvokeCallbackImpl(callback) {
1818318187
@Override

src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java

+17
Original file line numberDiff line numberDiff line change
@@ -5881,6 +5881,23 @@ public static UnregisterClientCommandField value(int id) throws NoSuchFieldError
58815881
}
58825882
throw new NoSuchFieldError();
58835883
}
5884+
}public enum StayActiveRequestCommandField {StayActiveDuration(0),;
5885+
private final int id;
5886+
StayActiveRequestCommandField(int id) {
5887+
this.id = id;
5888+
}
5889+
5890+
public int getID() {
5891+
return id;
5892+
}
5893+
public static StayActiveRequestCommandField value(int id) throws NoSuchFieldError {
5894+
for (StayActiveRequestCommandField field : StayActiveRequestCommandField.values()) {
5895+
if (field.getID() == id) {
5896+
return field;
5897+
}
5898+
}
5899+
throw new NoSuchFieldError();
5900+
}
58845901
}@Override
58855902
public String getAttributeName(long id) throws NoSuchFieldError {
58865903
return Attribute.value(id).toString();

src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java

+6
Original file line numberDiff line numberDiff line change
@@ -23352,10 +23352,16 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
2335223352
icdManagementClusterInteractionInfoMap.put("unregisterClient", icdManagementunregisterClientInteractionInfo);
2335323353

2335423354
Map<String, CommandParameterInfo> icdManagementstayActiveRequestCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
23355+
23356+
CommandParameterInfo icdManagementstayActiveRequeststayActiveDurationCommandParameterInfo = new CommandParameterInfo("stayActiveDuration", Long.class, Long.class);
23357+
icdManagementstayActiveRequestCommandParams.put("stayActiveDuration",icdManagementstayActiveRequeststayActiveDurationCommandParameterInfo);
2335523358
InteractionInfo icdManagementstayActiveRequestInteractionInfo = new InteractionInfo(
2335623359
(cluster, callback, commandArguments) -> {
2335723360
((ChipClusters.IcdManagementCluster) cluster)
2335823361
.stayActiveRequest((ChipClusters.IcdManagementCluster.StayActiveResponseCallback) callback
23362+
, (Long)
23363+
commandArguments.get("stayActiveDuration")
23364+
2335923365
);
2336023366
},
2336123367
() -> new DelegatedIcdManagementClusterStayActiveResponseCallback(),

src/controller/java/generated/java/matter/controller/cluster/clusters/IcdManagementCluster.kt

+7-1
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,17 @@ class IcdManagementCluster(
193193
logger.log(Level.FINE, "Invoke command succeeded: ${response}")
194194
}
195195

196-
suspend fun stayActiveRequest(timedInvokeTimeout: Duration? = null): StayActiveResponse {
196+
suspend fun stayActiveRequest(
197+
stayActiveDuration: UInt,
198+
timedInvokeTimeout: Duration? = null
199+
): StayActiveResponse {
197200
val commandId: UInt = 3u
198201

199202
val tlvWriter = TlvWriter()
200203
tlvWriter.startStructure(AnonymousTag)
204+
205+
val TAG_STAY_ACTIVE_DURATION_REQ: Int = 0
206+
tlvWriter.put(ContextSpecificTag(TAG_STAY_ACTIVE_DURATION_REQ), stayActiveDuration)
201207
tlvWriter.endStructure()
202208

203209
val request: InvokeRequest =

src/controller/python/chip/clusters/CHIPClusters.py

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)