blob: f7d77fec087a1c07e1dbfdd3765493e9a7d290a5 [file] [log] [blame]
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.
{{#chip_shared_structs}}
{{>idl_structure_definition extraIndent=0}}
{{/chip_shared_structs}}
{{!TODO: consider #chip_clusters as iteration point as well.
{{! Unsure about the differences}}
{{#all_user_clusters}}
{{~side}} cluster {{asUpperCamelCase name}} = {{code}} {
{{#zcl_enums}}
enum {{asUpperCamelCase name}} : ENUM{{multiply size 8}} {
{{#zcl_enum_items}}
k{{asUpperCamelCase label}} = {{value}};
{{/zcl_enum_items}}
}
{{/zcl_enums}}
{{#zcl_bitmaps}}
bitmap {{name}} : BITMAP{{multiply size 8}} {
{{#zcl_bitmap_items}}
k{{asUpperCamelCase label}} = {{asHex mask}};
{{/zcl_bitmap_items}}
}
{{/zcl_bitmaps}}
{{#chip_cluster_specific_structs}}
{{~>idl_structure_definition extraIndent=1}}
{{/chip_cluster_specific_structs}}
{{#zcl_events}}
{{#if isFabricSensitive}}fabric_sensitive {{/if~}} {{priority}} event {{!ensure space}}
{{~#chip_access_elements entity="event"~}}
{{~#first~}}access({{~/first~}}
{{~#not_first~}}, {{/not_first~}}
{{operation}}: {{role}}
{{~#last}}) {{/last~}}
{{~/chip_access_elements~}}
{{asUpperCamelCase name}} = {{code}} {
{{#zcl_event_fields}}
{{>idl_structure_member label=name}}
{{/zcl_event_fields}}
}
{{/zcl_events}}
{{#chip_server_cluster_attributes}}
{{! ensure indent }}{{#unless isWritableAttribute~}}
readonly {{!marker to place a space even with whitespace removal~}}
{{~/unless~}}
{{~!TODO: write only attributes should also be supported~}}
{{~#unless isReportableAttribute~}}
nosubscribe {{!marker to place a space even with whitespace removal~}}
{{~/unless~}}
{{~!Removes spaces~}} attribute {{!ensure space}}
{{~#chip_access_elements entity="attribute"~}}
{{~#first~}}access({{~/first~}}
{{~#not_first~}}, {{/not_first~}}
{{operation}}: {{role}}
{{~#last}}) {{/last~}}
{{~/chip_access_elements~}}
{{~#if isNullable~}}
nullable {{!marker to place a space even with whitespace removal~}}
{{~/if~}} {{type}}
{{~#unless isArray~}}
{{~#if (isString type)~}}
{{~#if maxLength~}}
<{{maxLength}}>
{{~/if~}}
{{~/if~}}
{{/unless}} {{asLowerCamelCase name~}}
{{~#if isArray~}} [] {{~/if}} = {{code~}}
;
{{/chip_server_cluster_attributes}}
{{~!--Open:Generating command request structs for all incoming commands into server side--~}}
{{#if (is_server side)}}
{{#all_incoming_commands_for_cluster name side}}
{{~>idl_command_request_struct}}
{{/all_incoming_commands_for_cluster}}
{{/if}}
{{~!--Close:Generating command request structs for all incoming commands into server side--~}}
{{~!--Open:Generating command request structs for all outgoing commands from client side--~}}
{{#if (is_client side)}}
{{#all_outgoing_commands_for_cluster name side}}
{{~>idl_command_request_struct}}
{{/all_outgoing_commands_for_cluster}}
{{/if}}
{{~!--Close:Generating command request structs for all outgoing commands from client side--~}}
{{~!--Open:Generating command response structs for all incoming commands into client side--~}}
{{#if (is_client side)}}
{{#all_incoming_commands_for_cluster name side}}
{{~>idl_command_response_struct}}
{{/all_incoming_commands_for_cluster}}
{{/if}}
{{~!--Close:Generating command response structs for all incoming commands into client side--~}}
{{~!--Open:Generating command response structs for all outgoing commands from server side--~}}
{{#if (is_server side)}}
{{#all_outgoing_commands_for_cluster name side}}
{{~>idl_command_response_struct}}
{{/all_outgoing_commands_for_cluster}}
{{/if}}
{{~!--Close:Generating command response structs for all outgoing commands from server side--~}}
{{#if (is_server side)}}
{{#all_incoming_commands_for_cluster name side}}
{{~>idl_command_request_response}}{{~new_line 1~}}
{{/all_incoming_commands_for_cluster}}
{{/if}}
{{#if (is_client side)}}
{{#all_outgoing_commands_for_cluster name side}}
{{~>idl_command_request_response}}{{~new_line 1~}}
{{/all_outgoing_commands_for_cluster}}
{{/if}}
}
{{/all_user_clusters}}
{{#user_endpoints}}
endpoint {{endpointId}} {
{{#if deviceIdentifier}}
device type {{chip_friendly_endpoint_type_name}} = {{deviceIdentifier}};
{{/if~}}
{{#user_clusters}}
{{#if enabled}}
{{#unless (isServer side)}}
binding cluster {{asUpperCamelCase name}};
{{/unless}}
{{/if}}
{{/user_clusters}}
{{#user_clusters}}
{{#if enabled}}
{{#if (isServer side)}}
server cluster {{asUpperCamelCase name}} {
{{#user_cluster_attributes}}
{{#if included}}
{{~#if (is_str_equal storageOption "NVM")}}
persist {{!align~}}
{{~else if (is_str_equal storageOption "External")}}
callback {{!align~}}
{{~else}}
ram {{!align~}}
{{~/if~}}
attribute {{asLowerCamelCase name}}
{{~#if_is_non_zero_default defaultValue~}}
{{!need space}} default = {{#if (isString type)}}"{{defaultValue}}"{{else}}{{defaultValue}}{{/if}}
{{~/if_is_non_zero_default~}}
;
{{/if}}
{{/user_cluster_attributes}}
}
{{/if}}
{{/if}}
{{/user_clusters}}
}
{{/user_endpoints}}