@@ -47,11 +47,11 @@ class DeviceEnergyManagementCluster(
47
47
private val endpointId : UShort
48
48
) {
49
49
class PowerAdjustmentCapabilityAttribute (
50
- val value : List < DeviceEnergyManagementClusterPowerAdjustCapabilityStruct > ?
50
+ val value : DeviceEnergyManagementClusterPowerAdjustCapabilityStruct ?
51
51
)
52
52
53
53
sealed class PowerAdjustmentCapabilityAttributeSubscriptionState {
54
- data class Success (val value : List < DeviceEnergyManagementClusterPowerAdjustCapabilityStruct > ? ) :
54
+ data class Success (val value : DeviceEnergyManagementClusterPowerAdjustCapabilityStruct ? ) :
55
55
PowerAdjustmentCapabilityAttributeSubscriptionState ()
56
56
57
57
data class Error (val exception : Exception ) :
@@ -750,21 +750,10 @@ class DeviceEnergyManagementCluster(
750
750
751
751
// Decode the TLV data into the appropriate type
752
752
val tlvReader = TlvReader (attributeData.data)
753
- val decodedValue: List < DeviceEnergyManagementClusterPowerAdjustCapabilityStruct > ? =
753
+ val decodedValue: DeviceEnergyManagementClusterPowerAdjustCapabilityStruct ? =
754
754
if (! tlvReader.isNull()) {
755
755
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)
768
757
} else {
769
758
null
770
759
}
@@ -817,21 +806,13 @@ class DeviceEnergyManagementCluster(
817
806
818
807
// Decode the TLV data into the appropriate type
819
808
val tlvReader = TlvReader (attributeData.data)
820
- val decodedValue: List < DeviceEnergyManagementClusterPowerAdjustCapabilityStruct > ? =
809
+ val decodedValue: DeviceEnergyManagementClusterPowerAdjustCapabilityStruct ? =
821
810
if (! tlvReader.isNull()) {
822
811
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
+ )
835
816
} else {
836
817
null
837
818
}
0 commit comments