From c820f328d3b131ebe11c78492aba55704cfc9eef Mon Sep 17 00:00:00 2001 From: Austin Hsieh <77706079+austinh0@users.noreply.github.com> Date: Tue, 11 Jan 2022 15:05:21 -0800 Subject: [PATCH] Make Java cluster id a constant instead of a method (#13469) --- .../java/templates/ChipClusters-java.zapt | 6 +- .../chip/devicecontroller/ChipClusters.java | 366 ++++++------------ 2 files changed, 124 insertions(+), 248 deletions(-) diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 4c54d8926c9c6f..37ae51f5e88ad3 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -83,14 +83,12 @@ public class ChipClusters { {{#chip_client_clusters}} public static class {{asUpperCamelCase name}}Cluster extends BaseChipCluster { + public static final long CLUSTER_ID = {{code}}L; + public {{asUpperCamelCase name}}Cluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("{{code}}"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); {{#chip_cluster_commands}} diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index b3dacb534f2601..52dff5986bd32f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -113,14 +113,12 @@ protected void finalize() throws Throwable { } public static class AccessControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 31L; + public AccessControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("31"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -231,14 +229,12 @@ private native void readClusterRevisionAttribute( } public static class AccountLoginCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1294L; + public AccountLoginCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1294"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -322,14 +318,12 @@ private native void subscribeClusterRevisionAttribute( } public static class AdministratorCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 60L; + public AdministratorCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("60"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -476,14 +470,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ApplicationBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1293L; + public ApplicationBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1293"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -633,14 +625,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ApplicationLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1292L; + public ApplicationLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1292"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -766,14 +756,12 @@ private native void subscribeClusterRevisionAttribute( } public static class AudioOutputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1291L; + public AudioOutputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1291"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -900,14 +888,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BarrierControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 259L; + public BarrierControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("259"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1031,14 +1017,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 40L; + public BasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("40"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1450,14 +1434,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BinaryInputBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 15L; + public BinaryInputBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("15"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1568,14 +1550,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BindingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 30L; + public BindingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("30"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1668,14 +1648,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BooleanStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 69L; + public BooleanStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("69"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -1726,14 +1704,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BridgedActionsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 37L; + public BridgedActionsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("37"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2160,14 +2136,12 @@ private native void subscribeClusterRevisionAttribute( } public static class BridgedDeviceBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 57L; + public BridgedDeviceBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("57"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2203,14 +2177,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ChannelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1284L; + public ChannelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1284"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -2367,14 +2339,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ColorControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 768L; + public ColorControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("768"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4221,14 +4191,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ContentLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1290L; + public ContentLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1290"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4361,14 +4329,12 @@ private native void subscribeClusterRevisionAttribute( } public static class DescriptorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 29L; + public DescriptorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("29"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4488,14 +4454,12 @@ private native void subscribeClusterRevisionAttribute( } public static class DiagnosticLogsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 50L; + public DiagnosticLogsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("50"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -4554,14 +4518,12 @@ private native void readAttributeListAttribute( } public static class DoorLockCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 257L; + public DoorLockCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("257"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5169,14 +5131,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ElectricalMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 2820L; + public ElectricalMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("2820"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5377,14 +5337,12 @@ private native void subscribeClusterRevisionAttribute( } public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 55L; + public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("55"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5575,14 +5533,12 @@ private native void subscribeClusterRevisionAttribute( } public static class FixedLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 64L; + public FixedLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("64"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5657,14 +5613,12 @@ private native void subscribeClusterRevisionAttribute( } public static class FlowMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1028L; + public FlowMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1028"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5760,14 +5714,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GeneralCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 48L; + public GeneralCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("48"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -5980,14 +5932,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GeneralDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 51L; + public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("51"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6196,14 +6146,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GroupKeyManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 63L; + public GroupKeyManagementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("63"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6469,14 +6417,12 @@ private native void subscribeClusterRevisionAttribute( } public static class GroupsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 4L; + public GroupsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("4"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6651,14 +6597,12 @@ private native void subscribeClusterRevisionAttribute( } public static class IdentifyCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 3L; + public IdentifyCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("3"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6794,14 +6738,12 @@ private native void subscribeClusterRevisionAttribute( } public static class IlluminanceMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1024L; + public IlluminanceMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1024"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -6956,14 +6898,12 @@ private native void subscribeClusterRevisionAttribute( } public static class KeypadInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1289L; + public KeypadInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1289"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7020,14 +6960,12 @@ private native void subscribeClusterRevisionAttribute( } public static class LevelControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 8L; + public LevelControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("8"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7634,14 +7572,12 @@ private native void subscribeClusterRevisionAttribute( } public static class LocalizationConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 43L; + public LocalizationConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("43"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7684,14 +7620,12 @@ private native void readSupportedLocalesAttribute( } public static class LowPowerCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1288L; + public LowPowerCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1288"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7740,14 +7674,12 @@ private native void subscribeClusterRevisionAttribute( } public static class MediaInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1287L; + public MediaInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1287"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -7907,14 +7839,12 @@ private native void subscribeClusterRevisionAttribute( } public static class MediaPlaybackCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1286L; + public MediaPlaybackCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1286"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8192,14 +8122,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 80L; + public ModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("80"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8372,14 +8300,12 @@ private native void subscribeClusterRevisionAttribute( } public static class NetworkCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 49L; + public NetworkCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("49"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8670,14 +8596,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 41L; + public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("41"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -8836,14 +8760,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 42L; + public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("42"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9028,14 +8950,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OccupancySensingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1030L; + public OccupancySensingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1030"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9117,14 +9037,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OnOffCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 6L; + public OnOffCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("6"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9391,14 +9309,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 7L; + public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("7"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9479,14 +9395,12 @@ private native void subscribeClusterRevisionAttribute( } public static class OperationalCredentialsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 62L; + public OperationalCredentialsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("62"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -9864,14 +9778,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PowerSourceCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 47L; + public PowerSourceCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("47"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10058,14 +9970,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PowerSourceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 46L; + public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("46"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10108,14 +10018,12 @@ private native void readClusterRevisionAttribute( } public static class PressureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1027L; + public PressureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1027"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10196,14 +10104,12 @@ private native void subscribeClusterRevisionAttribute( } public static class PumpConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 512L; + public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("512"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10697,14 +10603,12 @@ private native void subscribeClusterRevisionAttribute( } public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1029L; + public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1029"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -10800,14 +10704,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ScenesCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 5L; + public ScenesCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("5"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11128,14 +11030,12 @@ private native void subscribeClusterRevisionAttribute( } public static class SoftwareDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 52L; + public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("52"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11295,14 +11195,12 @@ private native void subscribeClusterRevisionAttribute( } public static class SwitchCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 59L; + public SwitchCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("59"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11398,14 +11296,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TargetNavigatorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1285L; + public TargetNavigatorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1285"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11521,14 +11417,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TemperatureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1026L; + public TemperatureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1026"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -11624,14 +11518,12 @@ private native void subscribeClusterRevisionAttribute( } public static class TestClusterCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1295L; + public TestClusterCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1295"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -14719,14 +14611,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThermostatCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 513L; + public ThermostatCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("513"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -15303,14 +15193,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThermostatUserInterfaceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 516L; + public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("516"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -15440,14 +15328,12 @@ private native void subscribeClusterRevisionAttribute( } public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 53L; + public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("53"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -16774,14 +16660,12 @@ private native void subscribeClusterRevisionAttribute( } public static class UserLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 65L; + public UserLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("65"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -16833,14 +16717,12 @@ private native void readClusterRevisionAttribute( } public static class WakeOnLanCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1283L; + public WakeOnLanCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("1283"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -16894,14 +16776,12 @@ private native void subscribeClusterRevisionAttribute( } public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 54L; + public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("54"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId); @@ -17154,14 +17034,12 @@ private native void subscribeClusterRevisionAttribute( } public static class WindowCoveringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 258L; + public WindowCoveringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } - public static long clusterId() { - return Long.parseUnsignedLong("258"); - } - @Override public native long initWithDevice(long devicePtr, int endpointId);