Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Add java empty event struct #31128

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public class ChipEventStructs {
{%- for cluster in clientClusters | sort(attribute='code') -%}
{%- set typeLookup = idl | createLookupContext(cluster) %}
{%- for event in cluster.events %}
{%- if event.fields %}
public static class {{cluster.name}}Cluster{{event.name}}Event {
{%- for field in event.fields %}
{%- set encodable = field | asEncodable(typeLookup) %}
Expand Down Expand Up @@ -133,6 +132,7 @@ public static class {{cluster.name}}Cluster{{event.name}}Event {
{%- endif -%}
;
{%- endfor %}
{%- if event.fields %}
for (StructElement element: ((StructType)tlvValue).value()) {
{%- for field in event.fields -%}
{%- set encodable = field | asEncodable(typeLookup) %}
Expand All @@ -146,6 +146,7 @@ public static class {{cluster.name}}Cluster{{event.name}}Event {
}
{%- endraw %}
}
{%- endif %}
return new {{cluster.name}}Cluster{{event.name}}Event(
{%- for field in event.fields %}
{{field.name}}{%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif %}
Expand Down Expand Up @@ -177,7 +178,6 @@ public static class {{cluster.name}}Cluster{{event.name}}Event {
return output.toString();
}
}
{%- endif %}
{%- endfor %}
{%- endfor %}
}
Loading
Loading