Skip to content

Commit

Permalink
Make Java cluster id a constant instead of a method (#13469)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinh0 authored and pull[bot] committed Jan 4, 2024
1 parent 1fbf5e7 commit c820f32
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 248 deletions.
6 changes: 2 additions & 4 deletions src/controller/java/templates/ChipClusters-java.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
Loading

0 comments on commit c820f32

Please sign in to comment.