Skip to content

Commit 59c5802

Browse files
committed
Updated after regen_all
1 parent c9c27a5 commit 59c5802

File tree

16 files changed

+154
-212
lines changed

16 files changed

+154
-212
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4233,7 +4233,7 @@ provisional cluster DeviceEnergyManagement = 152 {
42334233
readonly attribute ESAStateEnum ESAState = 2;
42344234
readonly attribute power_mw absMinPower = 3;
42354235
readonly attribute power_mw absMaxPower = 4;
4236-
readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability[] = 5;
4236+
readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability = 5;
42374237
readonly attribute optional nullable ForecastStruct forecast = 6;
42384238
readonly attribute optional OptOutStateEnum optOutState = 7;
42394239
readonly attribute command_id generatedCommandList[] = 65528;

examples/energy-management-app/energy-management-common/energy-management-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ provisional cluster DeviceEnergyManagement = 152 {
15941594
readonly attribute ESAStateEnum ESAState = 2;
15951595
readonly attribute power_mw absMinPower = 3;
15961596
readonly attribute power_mw absMaxPower = 4;
1597-
readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability[] = 5;
1597+
readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability = 5;
15981598
readonly attribute optional nullable ForecastStruct forecast = 6;
15991599
readonly attribute optional OptOutStateEnum optOutState = 7;
16001600
readonly attribute command_id generatedCommandList[] = 65528;

src/controller/data_model/controller-clusters.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -4758,7 +4758,7 @@ provisional cluster DeviceEnergyManagement = 152 {
47584758
readonly attribute ESAStateEnum ESAState = 2;
47594759
readonly attribute power_mw absMinPower = 3;
47604760
readonly attribute power_mw absMaxPower = 4;
4761-
readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability[] = 5;
4761+
readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability = 5;
47624762
readonly attribute optional nullable ForecastStruct forecast = 6;
47634763
readonly attribute optional OptOutStateEnum optOutState = 7;
47644764
readonly attribute command_id generatedCommandList[] = 65528;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -31267,7 +31267,7 @@ public void onResponse(StructType invokeStructValue) {
3126731267
}
3126831268

3126931269
public interface PowerAdjustmentCapabilityAttributeCallback extends BaseAttributeCallback {
31270-
void onSuccess(@Nullable List<ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct> value);
31270+
void onSuccess(@Nullable ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct value);
3127131271
}
3127231272

3127331273
public interface ForecastAttributeCallback extends BaseAttributeCallback {
@@ -31427,7 +31427,7 @@ public void readPowerAdjustmentCapabilityAttribute(
3142731427
readAttribute(new ReportCallbackImpl(callback, path) {
3142831428
@Override
3142931429
public void onSuccess(byte[] tlv) {
31430-
@Nullable List<ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
31430+
@Nullable ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
3143131431
callback.onSuccess(value);
3143231432
}
3143331433
}, POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID, true);
@@ -31440,7 +31440,7 @@ public void subscribePowerAdjustmentCapabilityAttribute(
3144031440
subscribeAttribute(new ReportCallbackImpl(callback, path) {
3144131441
@Override
3144231442
public void onSuccess(byte[] tlv) {
31443-
@Nullable List<ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
31443+
@Nullable ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
3144431444
callback.onSuccess(value);
3144531445
}
3144631446
}, POWER_ADJUSTMENT_CAPABILITY_ATTRIBUTE_ID, minInterval, maxInterval);

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -10882,10 +10882,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) {
1088210882
}
1088310883

1088410884
@Override
10885-
public void onSuccess(@Nullable List<ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct> valueList) {
10885+
public void onSuccess(@Nullable ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct value) {
1088610886
Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
10887-
CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct>");
10888-
responseValues.put(commandResponseInfo, valueList);
10887+
CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.DeviceEnergyManagementClusterPowerAdjustCapabilityStruct");
10888+
responseValues.put(commandResponseInfo, value);
1088910889
callback.onSuccess(responseValues);
1089010890
}
1089110891

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

-11
Original file line numberDiff line numberDiff line change
@@ -9619,17 +9619,6 @@ private static Map<String, InteractionInfo> readDeviceEnergyManagementInteractio
96199619
readDeviceEnergyManagementAbsMaxPowerCommandParams
96209620
);
96219621
result.put("readAbsMaxPowerAttribute", readDeviceEnergyManagementAbsMaxPowerAttributeInteractionInfo);
9622-
Map<String, CommandParameterInfo> readDeviceEnergyManagementPowerAdjustmentCapabilityCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
9623-
InteractionInfo readDeviceEnergyManagementPowerAdjustmentCapabilityAttributeInteractionInfo = new InteractionInfo(
9624-
(cluster, callback, commandArguments) -> {
9625-
((ChipClusters.DeviceEnergyManagementCluster) cluster).readPowerAdjustmentCapabilityAttribute(
9626-
(ChipClusters.DeviceEnergyManagementCluster.PowerAdjustmentCapabilityAttributeCallback) callback
9627-
);
9628-
},
9629-
() -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementClusterPowerAdjustmentCapabilityAttributeCallback(),
9630-
readDeviceEnergyManagementPowerAdjustmentCapabilityCommandParams
9631-
);
9632-
result.put("readPowerAdjustmentCapabilityAttribute", readDeviceEnergyManagementPowerAdjustmentCapabilityAttributeInteractionInfo);
96339622
Map<String, CommandParameterInfo> readDeviceEnergyManagementOptOutStateCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
96349623
InteractionInfo readDeviceEnergyManagementOptOutStateAttributeInteractionInfo = new InteractionInfo(
96359624
(cluster, callback, commandArguments) -> {

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

+9-28
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ class DeviceEnergyManagementCluster(
4747
private val endpointId: UShort
4848
) {
4949
class PowerAdjustmentCapabilityAttribute(
50-
val value: List<DeviceEnergyManagementClusterPowerAdjustCapabilityStruct>?
50+
val value: DeviceEnergyManagementClusterPowerAdjustCapabilityStruct?
5151
)
5252

5353
sealed class PowerAdjustmentCapabilityAttributeSubscriptionState {
54-
data class Success(val value: List<DeviceEnergyManagementClusterPowerAdjustCapabilityStruct>?) :
54+
data class Success(val value: DeviceEnergyManagementClusterPowerAdjustCapabilityStruct?) :
5555
PowerAdjustmentCapabilityAttributeSubscriptionState()
5656

5757
data class Error(val exception: Exception) :
@@ -750,21 +750,10 @@ class DeviceEnergyManagementCluster(
750750

751751
// Decode the TLV data into the appropriate type
752752
val tlvReader = TlvReader(attributeData.data)
753-
val decodedValue: List<DeviceEnergyManagementClusterPowerAdjustCapabilityStruct>? =
753+
val decodedValue: DeviceEnergyManagementClusterPowerAdjustCapabilityStruct? =
754754
if (!tlvReader.isNull()) {
755755
if (tlvReader.isNextTag(AnonymousTag)) {
756-
buildList<DeviceEnergyManagementClusterPowerAdjustCapabilityStruct> {
757-
tlvReader.enterArray(AnonymousTag)
758-
while (!tlvReader.isEndOfContainer()) {
759-
add(
760-
DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.fromTlv(
761-
AnonymousTag,
762-
tlvReader
763-
)
764-
)
765-
}
766-
tlvReader.exitContainer()
767-
}
756+
DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.fromTlv(AnonymousTag, tlvReader)
768757
} else {
769758
null
770759
}
@@ -817,21 +806,13 @@ class DeviceEnergyManagementCluster(
817806

818807
// Decode the TLV data into the appropriate type
819808
val tlvReader = TlvReader(attributeData.data)
820-
val decodedValue: List<DeviceEnergyManagementClusterPowerAdjustCapabilityStruct>? =
809+
val decodedValue: DeviceEnergyManagementClusterPowerAdjustCapabilityStruct? =
821810
if (!tlvReader.isNull()) {
822811
if (tlvReader.isNextTag(AnonymousTag)) {
823-
buildList<DeviceEnergyManagementClusterPowerAdjustCapabilityStruct> {
824-
tlvReader.enterArray(AnonymousTag)
825-
while (!tlvReader.isEndOfContainer()) {
826-
add(
827-
DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.fromTlv(
828-
AnonymousTag,
829-
tlvReader
830-
)
831-
)
832-
}
833-
tlvReader.exitContainer()
834-
}
812+
DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.fromTlv(
813+
AnonymousTag,
814+
tlvReader
815+
)
835816
} else {
836817
null
837818
}

0 commit comments

Comments
 (0)