diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index c2ab0dc702df53..4d1ac5923ff553 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -2929,7 +2929,7 @@ cluster RvcRunMode = 84 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -2945,7 +2945,6 @@ cluster RvcRunMode = 84 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -2982,7 +2981,7 @@ cluster RvcCleanMode = 85 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -2998,7 +2997,6 @@ cluster RvcCleanMode = 85 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -3480,10 +3478,6 @@ cluster RvcOperationalState = 97 {
/** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */
command Pause(): OperationalCommandResponse = 0;
- /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */
- command Stop(): OperationalCommandResponse = 1;
- /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */
- command Start(): OperationalCommandResponse = 2;
/** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */
command Resume(): OperationalCommandResponse = 3;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
@@ -7807,9 +7801,9 @@ endpoint 1 {
server cluster RvcRunMode {
callback attribute supportedModes;
callback attribute currentMode;
- callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 2;
@@ -7821,9 +7815,9 @@ endpoint 1 {
server cluster RvcCleanMode {
callback attribute supportedModes;
callback attribute currentMode;
- callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 2;
@@ -7971,6 +7965,7 @@ endpoint 1 {
callback attribute operationalError;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
index 438aef17a0516e..b06c93baae9358 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
@@ -9470,11 +9470,11 @@
"reportableChange": 0
},
{
- "name": "OnMode",
- "code": 3,
+ "name": "GeneratedCommandList",
+ "code": 65528,
"mfgCode": null,
"side": "server",
- "type": "int8u",
+ "type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -9486,8 +9486,8 @@
"reportableChange": 0
},
{
- "name": "GeneratedCommandList",
- "code": 65528,
+ "name": "AcceptedCommandList",
+ "code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
@@ -9502,8 +9502,8 @@
"reportableChange": 0
},
{
- "name": "AcceptedCommandList",
- "code": 65529,
+ "name": "EventList",
+ "code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
@@ -9511,7 +9511,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": null,
+ "defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -9626,11 +9626,11 @@
"reportableChange": 0
},
{
- "name": "OnMode",
- "code": 3,
+ "name": "GeneratedCommandList",
+ "code": 65528,
"mfgCode": null,
"side": "server",
- "type": "int8u",
+ "type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -9642,8 +9642,8 @@
"reportableChange": 0
},
{
- "name": "GeneratedCommandList",
- "code": 65528,
+ "name": "AcceptedCommandList",
+ "code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
@@ -9658,8 +9658,8 @@
"reportableChange": 0
},
{
- "name": "AcceptedCommandList",
- "code": 65529,
+ "name": "EventList",
+ "code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
@@ -9667,7 +9667,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": null,
+ "defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -11353,6 +11353,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
{
"name": "AttributeList",
"code": 65531,
diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp
index 999d62ae48c263..7fc5b61499fed2 100644
--- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp
+++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp
@@ -112,7 +112,8 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId)
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr);
gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate;
- gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, 0);
+ gRvcRunModeInstance =
+ new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures));
gRvcRunModeInstance->Init();
}
@@ -201,6 +202,7 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId)
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr);
gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate;
- gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, 0);
+ gRvcCleanModeInstance =
+ new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures));
gRvcCleanModeInstance->Init();
}
diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter
index 58e7d6e04bb19d..dc190ad05ecd31 100644
--- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter
+++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter
@@ -1020,7 +1020,7 @@ cluster RvcRunMode = 84 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -1036,7 +1036,6 @@ cluster RvcRunMode = 84 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -1073,7 +1072,7 @@ cluster RvcCleanMode = 85 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -1089,7 +1088,6 @@ cluster RvcCleanMode = 85 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -1172,10 +1170,6 @@ cluster RvcOperationalState = 97 {
/** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */
command Pause(): OperationalCommandResponse = 0;
- /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */
- command Stop(): OperationalCommandResponse = 1;
- /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */
- command Start(): OperationalCommandResponse = 2;
/** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */
command Resume(): OperationalCommandResponse = 3;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
@@ -1410,7 +1404,6 @@ endpoint 1 {
server cluster RvcRunMode {
callback attribute supportedModes;
callback attribute currentMode;
- callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
@@ -1425,7 +1418,6 @@ endpoint 1 {
server cluster RvcCleanMode {
callback attribute supportedModes;
callback attribute currentMode;
- callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
@@ -1454,8 +1446,6 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
handle command Pause;
- handle command Stop;
- handle command Start;
handle command Resume;
handle command OperationalCommandResponse;
}
diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter
index 4089d016fd603f..6ed9387af4a2db 100644
--- a/examples/rvc-app/rvc-common/rvc-app.matter
+++ b/examples/rvc-app/rvc-common/rvc-app.matter
@@ -943,7 +943,7 @@ cluster RvcRunMode = 84 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -959,7 +959,6 @@ cluster RvcRunMode = 84 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -996,7 +995,7 @@ cluster RvcCleanMode = 85 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -1012,7 +1011,6 @@ cluster RvcCleanMode = 85 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -1095,10 +1093,6 @@ cluster RvcOperationalState = 97 {
/** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */
command Pause(): OperationalCommandResponse = 0;
- /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */
- command Stop(): OperationalCommandResponse = 1;
- /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */
- command Start(): OperationalCommandResponse = 2;
/** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */
command Resume(): OperationalCommandResponse = 3;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
diff --git a/src/app/tests/suites/TestRVCOperationalState.yaml b/src/app/tests/suites/TestRVCOperationalState.yaml
index de40e7f6088be1..239e770abc216b 100644
--- a/src/app/tests/suites/TestRVCOperationalState.yaml
+++ b/src/app/tests/suites/TestRVCOperationalState.yaml
@@ -73,11 +73,6 @@ tests:
response:
value: 0
- - label: "Start Command"
- command: "Start"
- response:
- error: UNSUPPORTED_COMMAND
-
- label: "Read current Operational State"
command: "readAttribute"
attribute: "OperationalState"
@@ -110,11 +105,6 @@ tests:
response:
value: 0
- - label: "Stop Command"
- command: "Stop"
- response:
- error: UNSUPPORTED_COMMAND
-
- label: "Read current Operational State"
command: "readAttribute"
attribute: "OperationalState"
diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml
index bcf6e2b4e72555..abacba4bafe631 100644
--- a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml
@@ -90,8 +90,8 @@ This is because zap does not currently support generating code for clusters that
-
-
+
+
diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml
index 41a0c64e4af169..27817054967fb5 100644
--- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml
@@ -64,13 +64,9 @@ both values from this cluster and from the base cluster.
Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server.
-
- Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted.
-
+
-
- Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started.
-
+
Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press).
diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml
index 03725f92756c56..3c8686b6d90fb3 100644
--- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml
@@ -41,7 +41,7 @@ limitations under the License.
SupportedModes
CurrentMode
- OnMode
+
@@ -60,4 +60,11 @@ limitations under the License.
+
+
+
+
+
+
+
diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml
index 9f102dd8b63b15..f2d24e62ede0f4 100644
--- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml
@@ -48,7 +48,7 @@ limitations under the License.
SupportedModes
CurrentMode
- OnMode
+
@@ -67,4 +67,11 @@ limitations under the License.
+
+
+
+
+
+
+
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index ebf77014acc5b3..4512f11959822c 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -414,18 +414,8 @@
"OnMode",
"FeatureMap"
],
- "RVC Clean Mode": [
- "SupportedModes",
- "CurrentMode",
- "OnMode",
- "FeatureMap"
- ],
- "RVC Run Mode": [
- "SupportedModes",
- "CurrentMode",
- "OnMode",
- "FeatureMap"
- ],
+ "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Operational State": [
"OperationalState",
"OperationalError",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index b0d50dc7ba2c44..12ed5d6cd2142d 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -412,18 +412,8 @@
"OnMode",
"FeatureMap"
],
- "RVC Clean Mode": [
- "SupportedModes",
- "CurrentMode",
- "OnMode",
- "FeatureMap"
- ],
- "RVC Run Mode": [
- "SupportedModes",
- "CurrentMode",
- "OnMode",
- "FeatureMap"
- ],
+ "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
+ "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Operational State": [
"OperationalState",
"OperationalError",
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 925f665448bd53..dacc1008177ad9 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -3117,7 +3117,7 @@ cluster RvcRunMode = 84 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -3133,7 +3133,6 @@ cluster RvcRunMode = 84 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -3170,7 +3169,7 @@ cluster RvcCleanMode = 85 {
}
bitmap Feature : bitmap32 {
- kOnOff = 0x1;
+ kNoFeatures = 0x0;
}
struct ModeTagStruct {
@@ -3186,7 +3185,6 @@ cluster RvcCleanMode = 85 {
readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
- attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -3712,10 +3710,6 @@ cluster RvcOperationalState = 97 {
/** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */
command Pause(): OperationalCommandResponse = 0;
- /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */
- command Stop(): OperationalCommandResponse = 1;
- /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */
- command Start(): OperationalCommandResponse = 2;
/** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */
command Resume(): OperationalCommandResponse = 3;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index d5de31ddb4ceea..05034b2792c9e7 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -21433,7 +21433,6 @@ public static class RvcRunModeCluster extends BaseChipCluster {
private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L;
private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L;
- private static final long ON_MODE_ATTRIBUTE_ID = 3L;
private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
@@ -21496,10 +21495,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback {
void onSuccess(List value);
}
- public interface OnModeAttributeCallback extends BaseAttributeCallback {
- void onSuccess(@Nullable Integer value);
- }
-
public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List value);
}
@@ -21566,40 +21561,6 @@ public void onSuccess(byte[] tlv) {
}, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval);
}
- public void readOnModeAttribute(
- OnModeAttributeCallback callback) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID);
-
- readAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- callback.onSuccess(value);
- }
- }, ON_MODE_ATTRIBUTE_ID, true);
- }
-
- public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) {
- writeOnModeAttribute(callback, value, 0);
- }
-
- public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
- BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType();
- writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
- }
-
- public void subscribeOnModeAttribute(
- OnModeAttributeCallback callback, int minInterval, int maxInterval) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID);
-
- subscribeAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- }
- }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval);
- }
-
public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
@@ -21756,7 +21717,6 @@ public static class RvcCleanModeCluster extends BaseChipCluster {
private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L;
private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L;
- private static final long ON_MODE_ATTRIBUTE_ID = 3L;
private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
@@ -21819,10 +21779,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback {
void onSuccess(List value);
}
- public interface OnModeAttributeCallback extends BaseAttributeCallback {
- void onSuccess(@Nullable Integer value);
- }
-
public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List value);
}
@@ -21889,40 +21845,6 @@ public void onSuccess(byte[] tlv) {
}, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval);
}
- public void readOnModeAttribute(
- OnModeAttributeCallback callback) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID);
-
- readAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- callback.onSuccess(value);
- }
- }, ON_MODE_ATTRIBUTE_ID, true);
- }
-
- public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) {
- writeOnModeAttribute(callback, value, 0);
- }
-
- public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
- BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType();
- writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
- }
-
- public void subscribeOnModeAttribute(
- OnModeAttributeCallback callback, int minInterval, int maxInterval) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID);
-
- subscribeAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- }
- }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval);
- }
-
public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
@@ -25413,58 +25335,6 @@ public void onResponse(StructType invokeStructValue) {
}}, commandId, value, timedInvokeTimeoutMs);
}
- public void stop(OperationalCommandResponseCallback callback) {
- stop(callback, 0);
- }
-
- public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) {
- final long commandId = 1L;
-
- ArrayList elements = new ArrayList<>();
- StructType value = new StructType(elements);
- invoke(new InvokeCallbackImpl(callback) {
- @Override
- public void onResponse(StructType invokeStructValue) {
- final long commandResponseStateFieldID = 0L;
- ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null;
- for (StructElement element: invokeStructValue.value()) {
- if (element.contextTagNum() == commandResponseStateFieldID) {
- if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
- StructType castingValue = element.value(StructType.class);
- commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue);
- }
- }
- }
- callback.onSuccess(commandResponseState);
- }}, commandId, value, timedInvokeTimeoutMs);
- }
-
- public void start(OperationalCommandResponseCallback callback) {
- start(callback, 0);
- }
-
- public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) {
- final long commandId = 2L;
-
- ArrayList elements = new ArrayList<>();
- StructType value = new StructType(elements);
- invoke(new InvokeCallbackImpl(callback) {
- @Override
- public void onResponse(StructType invokeStructValue) {
- final long commandResponseStateFieldID = 0L;
- ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null;
- for (StructElement element: invokeStructValue.value()) {
- if (element.contextTagNum() == commandResponseStateFieldID) {
- if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
- StructType castingValue = element.value(StructType.class);
- commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue);
- }
- }
- }
- callback.onSuccess(commandResponseState);
- }}, commandId, value, timedInvokeTimeoutMs);
- }
-
public void resume(OperationalCommandResponseCallback callback) {
resume(callback, 0);
}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 92a679fe443b26..31a6462aa17d1e 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -6862,7 +6862,6 @@ public long getID() {
public enum Attribute {
SupportedModes(0L),
CurrentMode(1L),
- OnMode(3L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
@@ -6983,7 +6982,6 @@ public long getID() {
public enum Attribute {
SupportedModes(0L),
CurrentMode(1L),
- OnMode(3L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
@@ -8233,8 +8231,6 @@ public static Event value(long id) throws NoSuchFieldError {
public enum Command {
Pause(0L),
- Stop(1L),
- Start(2L),
Resume(3L),
GoHome(128L),;
private final long id;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 70c1e3f12787d7..ab150d36e3925d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -7567,27 +7567,6 @@ public void onError(Exception ex) {
}
}
- public static class DelegatedRvcRunModeClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeCluster.OnModeAttributeCallback, DelegatedClusterCallback {
- private ClusterCommandCallback callback;
- @Override
- public void setCallbackDelegate(ClusterCommandCallback callback) {
- this.callback = callback;
- }
-
- @Override
- public void onSuccess(@Nullable Integer value) {
- Map responseValues = new LinkedHashMap<>();
- CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
- responseValues.put(commandResponseInfo, value);
- callback.onSuccess(responseValues);
- }
-
- @Override
- public void onError(Exception ex) {
- callback.onFailure(ex);
- }
- }
-
public static class DelegatedRvcRunModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -7717,27 +7696,6 @@ public void onError(Exception ex) {
}
}
- public static class DelegatedRvcCleanModeClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback, DelegatedClusterCallback {
- private ClusterCommandCallback callback;
- @Override
- public void setCallbackDelegate(ClusterCommandCallback callback) {
- this.callback = callback;
- }
-
- @Override
- public void onSuccess(@Nullable Integer value) {
- Map responseValues = new LinkedHashMap<>();
- CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
- responseValues.put(commandResponseInfo, value);
- callback.onSuccess(responseValues);
- }
-
- @Override
- public void onError(Exception ex) {
- callback.onFailure(ex);
- }
- }
-
public static class DelegatedRvcCleanModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -23253,30 +23211,6 @@ public Map> getCommandMap() {
);
rvcOperationalStateClusterInteractionInfoMap.put("pause", rvcOperationalStatepauseInteractionInfo);
- Map rvcOperationalStatestopCommandParams = new LinkedHashMap();
- InteractionInfo rvcOperationalStatestopInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.RvcOperationalStateCluster) cluster)
- .stop((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback
- );
- },
- () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(),
- rvcOperationalStatestopCommandParams
- );
- rvcOperationalStateClusterInteractionInfoMap.put("stop", rvcOperationalStatestopInteractionInfo);
-
- Map rvcOperationalStatestartCommandParams = new LinkedHashMap();
- InteractionInfo rvcOperationalStatestartInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.RvcOperationalStateCluster) cluster)
- .start((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback
- );
- },
- () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(),
- rvcOperationalStatestartCommandParams
- );
- rvcOperationalStateClusterInteractionInfoMap.put("start", rvcOperationalStatestartInteractionInfo);
-
Map rvcOperationalStateresumeCommandParams = new LinkedHashMap();
InteractionInfo rvcOperationalStateresumeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index a7fe287e152a5b..85f913818cf9f8 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -6807,17 +6807,6 @@ private static Map readRvcRunModeInteractionInfo() {
readRvcRunModeCurrentModeCommandParams
);
result.put("readCurrentModeAttribute", readRvcRunModeCurrentModeAttributeInteractionInfo);
- Map readRvcRunModeOnModeCommandParams = new LinkedHashMap();
- InteractionInfo readRvcRunModeOnModeAttributeInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.RvcRunModeCluster) cluster).readOnModeAttribute(
- (ChipClusters.RvcRunModeCluster.OnModeAttributeCallback) callback
- );
- },
- () -> new ClusterInfoMapping.DelegatedRvcRunModeClusterOnModeAttributeCallback(),
- readRvcRunModeOnModeCommandParams
- );
- result.put("readOnModeAttribute", readRvcRunModeOnModeAttributeInteractionInfo);
Map readRvcRunModeGeneratedCommandListCommandParams = new LinkedHashMap();
InteractionInfo readRvcRunModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
@@ -6910,17 +6899,6 @@ private static Map readRvcCleanModeInteractionInfo() {
readRvcCleanModeCurrentModeCommandParams
);
result.put("readCurrentModeAttribute", readRvcCleanModeCurrentModeAttributeInteractionInfo);
- Map readRvcCleanModeOnModeCommandParams = new LinkedHashMap();
- InteractionInfo readRvcCleanModeOnModeAttributeInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.RvcCleanModeCluster) cluster).readOnModeAttribute(
- (ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback) callback
- );
- },
- () -> new ClusterInfoMapping.DelegatedRvcCleanModeClusterOnModeAttributeCallback(),
- readRvcCleanModeOnModeCommandParams
- );
- result.put("readOnModeAttribute", readRvcCleanModeOnModeAttributeInteractionInfo);
Map readRvcCleanModeGeneratedCommandListCommandParams = new LinkedHashMap();
InteractionInfo readRvcCleanModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index f9357edc588b82..dc674be7a4a7ec 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -981,52 +981,8 @@ public Map> getWriteAttributeMap() {
writeLaundryWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo);
writeAttributeMap.put("laundryWasherControls", writeLaundryWasherControlsInteractionInfo);
Map writeRvcRunModeInteractionInfo = new LinkedHashMap<>();
- Map writeRvcRunModeOnModeCommandParams = new LinkedHashMap();
- CommandParameterInfo rvcRunModeonModeCommandParameterInfo =
- new CommandParameterInfo(
- "value",
- Integer.class,
- Integer.class
- );
- writeRvcRunModeOnModeCommandParams.put(
- "value",
- rvcRunModeonModeCommandParameterInfo
- );
- InteractionInfo writeRvcRunModeOnModeAttributeInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.RvcRunModeCluster) cluster).writeOnModeAttribute(
- (DefaultClusterCallback) callback,
- (Integer) commandArguments.get("value")
- );
- },
- () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
- writeRvcRunModeOnModeCommandParams
- );
- writeRvcRunModeInteractionInfo.put("writeOnModeAttribute", writeRvcRunModeOnModeAttributeInteractionInfo);
writeAttributeMap.put("rvcRunMode", writeRvcRunModeInteractionInfo);
Map writeRvcCleanModeInteractionInfo = new LinkedHashMap<>();
- Map writeRvcCleanModeOnModeCommandParams = new LinkedHashMap();
- CommandParameterInfo rvcCleanModeonModeCommandParameterInfo =
- new CommandParameterInfo(
- "value",
- Integer.class,
- Integer.class
- );
- writeRvcCleanModeOnModeCommandParams.put(
- "value",
- rvcCleanModeonModeCommandParameterInfo
- );
- InteractionInfo writeRvcCleanModeOnModeAttributeInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.RvcCleanModeCluster) cluster).writeOnModeAttribute(
- (DefaultClusterCallback) callback,
- (Integer) commandArguments.get("value")
- );
- },
- () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
- writeRvcCleanModeOnModeCommandParams
- );
- writeRvcCleanModeInteractionInfo.put("writeOnModeAttribute", writeRvcCleanModeOnModeAttributeInteractionInfo);
writeAttributeMap.put("rvcCleanMode", writeRvcCleanModeInteractionInfo);
Map writeTemperatureControlInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("temperatureControl", writeTemperatureControlInteractionInfo);
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt
index fc06787142bc87..cf21074dc5fefb 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt
@@ -32,9 +32,6 @@ import matter.controller.SubscriptionState
import matter.controller.UByteSubscriptionState
import matter.controller.UIntSubscriptionState
import matter.controller.UShortSubscriptionState
-import matter.controller.WriteRequest
-import matter.controller.WriteRequests
-import matter.controller.WriteResponse
import matter.controller.cluster.structs.*
import matter.controller.model.AttributePath
import matter.controller.model.CommandPath
@@ -60,16 +57,6 @@ class RvcCleanModeCluster(
object SubscriptionEstablished : SupportedModesAttributeSubscriptionState()
}
- class OnModeAttribute(val value: UByte?)
-
- sealed class OnModeAttributeSubscriptionState {
- data class Success(val value: UByte?) : OnModeAttributeSubscriptionState()
-
- data class Error(val exception: Exception) : OnModeAttributeSubscriptionState()
-
- object SubscriptionEstablished : OnModeAttributeSubscriptionState()
- }
-
class GeneratedCommandListAttribute(val value: List)
sealed class GeneratedCommandListAttributeSubscriptionState {
@@ -352,147 +339,6 @@ class RvcCleanModeCluster(
}
}
- suspend fun readOnModeAttribute(): OnModeAttribute {
- val ATTRIBUTE_ID: UInt = 3u
-
- val attributePath =
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
-
- val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
-
- val response = controller.read(readRequest)
-
- if (response.successes.isEmpty()) {
- logger.log(Level.WARNING, "Read command failed")
- throw IllegalStateException("Read command failed with failures: ${response.failures}")
- }
-
- logger.log(Level.FINE, "Read command succeeded")
-
- val attributeData =
- response.successes.filterIsInstance().firstOrNull {
- it.path.attributeId == ATTRIBUTE_ID
- }
-
- requireNotNull(attributeData) { "Onmode attribute not found in response" }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (!tlvReader.isNull()) {
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
- } else {
- tlvReader.getNull(AnonymousTag)
- null
- }
-
- return OnModeAttribute(decodedValue)
- }
-
- suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) {
- val ATTRIBUTE_ID: UInt = 3u
-
- val tlvWriter = TlvWriter()
- tlvWriter.put(AnonymousTag, value)
-
- val writeRequests: WriteRequests =
- WriteRequests(
- requests =
- listOf(
- WriteRequest(
- attributePath =
- AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID),
- tlvPayload = tlvWriter.getEncoded()
- )
- ),
- timedRequest = timedWriteTimeout
- )
-
- val response: WriteResponse = controller.write(writeRequests)
-
- when (response) {
- is WriteResponse.Success -> {
- logger.log(Level.FINE, "Write command succeeded")
- }
- is WriteResponse.PartialWriteFailure -> {
- val aggregatedErrorMessage =
- response.failures.joinToString("\n") { failure ->
- "Error at ${failure.attributePath}: ${failure.ex.message}"
- }
-
- response.failures.forEach { failure ->
- logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}")
- }
-
- throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage")
- }
- }
- }
-
- suspend fun subscribeOnModeAttribute(
- minInterval: Int,
- maxInterval: Int
- ): Flow {
- val ATTRIBUTE_ID: UInt = 3u
- val attributePaths =
- listOf(
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
- )
-
- val subscribeRequest: SubscribeRequest =
- SubscribeRequest(
- eventPaths = emptyList(),
- attributePaths = attributePaths,
- minInterval = Duration.ofSeconds(minInterval.toLong()),
- maxInterval = Duration.ofSeconds(maxInterval.toLong())
- )
-
- return controller.subscribe(subscribeRequest).transform { subscriptionState ->
- when (subscriptionState) {
- is SubscriptionState.SubscriptionErrorNotification -> {
- emit(
- OnModeAttributeSubscriptionState.Error(
- Exception(
- "Subscription terminated with error code: ${subscriptionState.terminationCause}"
- )
- )
- )
- }
- is SubscriptionState.NodeStateUpdate -> {
- val attributeData =
- subscriptionState.updateState.successes
- .filterIsInstance()
- .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
-
- requireNotNull(attributeData) { "Onmode attribute not found in Node State update" }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (!tlvReader.isNull()) {
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
- } else {
- tlvReader.getNull(AnonymousTag)
- null
- }
-
- decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) }
- }
- SubscriptionState.SubscriptionEstablished -> {
- emit(OnModeAttributeSubscriptionState.SubscriptionEstablished)
- }
- }
- }
- }
-
suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
val ATTRIBUTE_ID: UInt = 65528u
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt
index d2a53548665600..3c46632bac37f1 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt
@@ -184,90 +184,6 @@ class RvcOperationalStateCluster(
return OperationalCommandResponse(commandResponseState_decoded)
}
- suspend fun stop(timedInvokeTimeout: Duration? = null): OperationalCommandResponse {
- val commandId: UInt = 1u
-
- val tlvWriter = TlvWriter()
- tlvWriter.startStructure(AnonymousTag)
- tlvWriter.endStructure()
-
- val request: InvokeRequest =
- InvokeRequest(
- CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
- tlvPayload = tlvWriter.getEncoded(),
- timedRequest = timedInvokeTimeout
- )
-
- val response: InvokeResponse = controller.invoke(request)
- logger.log(Level.FINE, "Invoke command succeeded: ${response}")
-
- val tlvReader = TlvReader(response.payload)
- tlvReader.enterStructure(AnonymousTag)
- val TAG_COMMAND_RESPONSE_STATE: Int = 0
- var commandResponseState_decoded: RvcOperationalStateClusterErrorStateStruct? = null
-
- while (!tlvReader.isEndOfContainer()) {
- val tag = tlvReader.peekElement().tag
-
- if (tag == ContextSpecificTag(TAG_COMMAND_RESPONSE_STATE)) {
- commandResponseState_decoded =
- RvcOperationalStateClusterErrorStateStruct.fromTlv(tag, tlvReader)
- } else {
- tlvReader.skipElement()
- }
- }
-
- if (commandResponseState_decoded == null) {
- throw IllegalStateException("commandResponseState not found in TLV")
- }
-
- tlvReader.exitContainer()
-
- return OperationalCommandResponse(commandResponseState_decoded)
- }
-
- suspend fun start(timedInvokeTimeout: Duration? = null): OperationalCommandResponse {
- val commandId: UInt = 2u
-
- val tlvWriter = TlvWriter()
- tlvWriter.startStructure(AnonymousTag)
- tlvWriter.endStructure()
-
- val request: InvokeRequest =
- InvokeRequest(
- CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
- tlvPayload = tlvWriter.getEncoded(),
- timedRequest = timedInvokeTimeout
- )
-
- val response: InvokeResponse = controller.invoke(request)
- logger.log(Level.FINE, "Invoke command succeeded: ${response}")
-
- val tlvReader = TlvReader(response.payload)
- tlvReader.enterStructure(AnonymousTag)
- val TAG_COMMAND_RESPONSE_STATE: Int = 0
- var commandResponseState_decoded: RvcOperationalStateClusterErrorStateStruct? = null
-
- while (!tlvReader.isEndOfContainer()) {
- val tag = tlvReader.peekElement().tag
-
- if (tag == ContextSpecificTag(TAG_COMMAND_RESPONSE_STATE)) {
- commandResponseState_decoded =
- RvcOperationalStateClusterErrorStateStruct.fromTlv(tag, tlvReader)
- } else {
- tlvReader.skipElement()
- }
- }
-
- if (commandResponseState_decoded == null) {
- throw IllegalStateException("commandResponseState not found in TLV")
- }
-
- tlvReader.exitContainer()
-
- return OperationalCommandResponse(commandResponseState_decoded)
- }
-
suspend fun resume(timedInvokeTimeout: Duration? = null): OperationalCommandResponse {
val commandId: UInt = 3u
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt
index 2297e2fb439d4e..05237cd481e136 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt
@@ -32,9 +32,6 @@ import matter.controller.SubscriptionState
import matter.controller.UByteSubscriptionState
import matter.controller.UIntSubscriptionState
import matter.controller.UShortSubscriptionState
-import matter.controller.WriteRequest
-import matter.controller.WriteRequests
-import matter.controller.WriteResponse
import matter.controller.cluster.structs.*
import matter.controller.model.AttributePath
import matter.controller.model.CommandPath
@@ -57,16 +54,6 @@ class RvcRunModeCluster(private val controller: MatterController, private val en
object SubscriptionEstablished : SupportedModesAttributeSubscriptionState()
}
- class OnModeAttribute(val value: UByte?)
-
- sealed class OnModeAttributeSubscriptionState {
- data class Success(val value: UByte?) : OnModeAttributeSubscriptionState()
-
- data class Error(val exception: Exception) : OnModeAttributeSubscriptionState()
-
- object SubscriptionEstablished : OnModeAttributeSubscriptionState()
- }
-
class GeneratedCommandListAttribute(val value: List)
sealed class GeneratedCommandListAttributeSubscriptionState {
@@ -349,147 +336,6 @@ class RvcRunModeCluster(private val controller: MatterController, private val en
}
}
- suspend fun readOnModeAttribute(): OnModeAttribute {
- val ATTRIBUTE_ID: UInt = 3u
-
- val attributePath =
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
-
- val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
-
- val response = controller.read(readRequest)
-
- if (response.successes.isEmpty()) {
- logger.log(Level.WARNING, "Read command failed")
- throw IllegalStateException("Read command failed with failures: ${response.failures}")
- }
-
- logger.log(Level.FINE, "Read command succeeded")
-
- val attributeData =
- response.successes.filterIsInstance().firstOrNull {
- it.path.attributeId == ATTRIBUTE_ID
- }
-
- requireNotNull(attributeData) { "Onmode attribute not found in response" }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (!tlvReader.isNull()) {
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
- } else {
- tlvReader.getNull(AnonymousTag)
- null
- }
-
- return OnModeAttribute(decodedValue)
- }
-
- suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) {
- val ATTRIBUTE_ID: UInt = 3u
-
- val tlvWriter = TlvWriter()
- tlvWriter.put(AnonymousTag, value)
-
- val writeRequests: WriteRequests =
- WriteRequests(
- requests =
- listOf(
- WriteRequest(
- attributePath =
- AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID),
- tlvPayload = tlvWriter.getEncoded()
- )
- ),
- timedRequest = timedWriteTimeout
- )
-
- val response: WriteResponse = controller.write(writeRequests)
-
- when (response) {
- is WriteResponse.Success -> {
- logger.log(Level.FINE, "Write command succeeded")
- }
- is WriteResponse.PartialWriteFailure -> {
- val aggregatedErrorMessage =
- response.failures.joinToString("\n") { failure ->
- "Error at ${failure.attributePath}: ${failure.ex.message}"
- }
-
- response.failures.forEach { failure ->
- logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}")
- }
-
- throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage")
- }
- }
- }
-
- suspend fun subscribeOnModeAttribute(
- minInterval: Int,
- maxInterval: Int
- ): Flow {
- val ATTRIBUTE_ID: UInt = 3u
- val attributePaths =
- listOf(
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
- )
-
- val subscribeRequest: SubscribeRequest =
- SubscribeRequest(
- eventPaths = emptyList(),
- attributePaths = attributePaths,
- minInterval = Duration.ofSeconds(minInterval.toLong()),
- maxInterval = Duration.ofSeconds(maxInterval.toLong())
- )
-
- return controller.subscribe(subscribeRequest).transform { subscriptionState ->
- when (subscriptionState) {
- is SubscriptionState.SubscriptionErrorNotification -> {
- emit(
- OnModeAttributeSubscriptionState.Error(
- Exception(
- "Subscription terminated with error code: ${subscriptionState.terminationCause}"
- )
- )
- )
- }
- is SubscriptionState.NodeStateUpdate -> {
- val attributeData =
- subscriptionState.updateState.successes
- .filterIsInstance()
- .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
-
- requireNotNull(attributeData) { "Onmode attribute not found in Node State update" }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (!tlvReader.isNull()) {
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
- } else {
- tlvReader.getNull(AnonymousTag)
- null
- }
-
- decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) }
- }
- SubscriptionState.SubscriptionEstablished -> {
- emit(OnModeAttributeSubscriptionState.SubscriptionEstablished)
- }
- }
- }
- }
-
suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
val ATTRIBUTE_ID: UInt = 65528u
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 8afc7c33e1da24..e1f30685eeecb8 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -14931,29 +14931,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
value);
return value;
}
- case Attributes::OnMode::Id: {
- using TypeInfo = Attributes::OnMode::TypeInfo;
- TypeInfo::DecodableType cppValue;
- *aError = app::DataModel::Decode(aReader, cppValue);
- if (*aError != CHIP_NO_ERROR)
- {
- return nullptr;
- }
- jobject value;
- if (cppValue.IsNull())
- {
- value = nullptr;
- }
- else
- {
- std::string valueClassName = "java/lang/Integer";
- std::string valueCtorSignature = "(I)V";
- jint jnivalue = static_cast(cppValue.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
- jnivalue, value);
- }
- return value;
- }
case Attributes::GeneratedCommandList::Id: {
using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
TypeInfo::DecodableType cppValue;
@@ -15219,29 +15196,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
value);
return value;
}
- case Attributes::OnMode::Id: {
- using TypeInfo = Attributes::OnMode::TypeInfo;
- TypeInfo::DecodableType cppValue;
- *aError = app::DataModel::Decode(aReader, cppValue);
- if (*aError != CHIP_NO_ERROR)
- {
- return nullptr;
- }
- jobject value;
- if (cppValue.IsNull())
- {
- value = nullptr;
- }
- else
- {
- std::string valueClassName = "java/lang/Integer";
- std::string valueCtorSignature = "(I)V";
- jint jnivalue = static_cast(cppValue.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
- jnivalue, value);
- }
- return value;
- }
case Attributes::GeneratedCommandList::Id: {
using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
TypeInfo::DecodableType cppValue;
diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
new file mode 100644
index 00000000000000..5d003f3a064e83
--- /dev/null
+++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp
@@ -0,0 +1,15101 @@
+/*
+ *
+ * Copyright (c) 2022 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// THIS FILE IS GENERATED BY ZAP
+#include "CHIPInvokeCallbacks.h"
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wshorten-64-to-32"
+
+#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \
+ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME
+
+using namespace chip;
+using namespace chip::Controller;
+
+JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cppValue =
+ static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ IdentifyCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cppValue =
+ static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ OnOffCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cppValue =
+ static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ OnOffCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ OnOffCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cppValue =
+ static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ OnOffSwitchConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cppValue.SetRaw(static_cast::IntegerType>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value)));
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cppValue =
+ static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ if (value == nullptr)
+ {
+ cppValue.SetNull();
+ }
+ else
+ {
+ auto & nonNullValue_0 = cppValue.SetNonNull();
+ nonNullValue_0 = static_cast>(
+ chip::JniReferences::GetInstance().IntegerToPrimitive(value));
+ }
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BinaryInputBasicCluster, writeActiveTextAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value)));
+ cppValue = cleanupStrings.back()->charSpan();
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onFailure.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY));
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr);
+ VerifyOrReturn(cppCluster != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE));
+
+ auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel());
+ auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel());
+
+ if (timedWriteTimeoutMs == nullptr)
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall);
+ }
+ else
+ {
+ err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall,
+ chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs));
+ }
+ VerifyOrReturn(
+ err == CHIP_NO_ERROR,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err));
+
+ onSuccess.release();
+ onFailure.release();
+}
+
+JNI_METHOD(void, BinaryInputBasicCluster, writeDescriptionAttribute)
+(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs)
+{
+ chip::DeviceLayer::StackLock lock;
+ ListFreer listFreer;
+ using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::Description::TypeInfo;
+ TypeInfo::Type cppValue;
+
+ std::vector> cleanupByteArrays;
+ std::vector> cleanupStrings;
+
+ cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value)));
+ cppValue = cleanupStrings.back()->charSpan();
+
+ std::unique_ptr onSuccess(
+ Platform::New(callback), Platform::Delete);
+ VerifyOrReturn(onSuccess.get() != nullptr,
+ chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(
+ env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY));
+
+ std::unique_ptr onFailure(
+ Platform::New(callback), Platform::Delete