3 {{#if (chip_has_client_clusters)}}
4 #ifndef CHIP_CLUSTERS_H
5 #define CHIP_CLUSTERS_H
7 #import <Foundation/Foundation.h>
11 typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
13 NS_ASSUME_NONNULL_BEGIN
17 * This is the base class for clusters.
19 @interface CHIPCluster : NSObject
21 - (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER;
22 - (instancetype)init NS_UNAVAILABLE;
23 + (instancetype)new NS_UNAVAILABLE;
27 {{#chip_client_clusters}}
34 @interface CHIP{{asCamelCased name false}} : CHIPCluster
36 {{#chip_server_cluster_commands}}
37 {{#if (zcl_command_arguments_count this.id)}}
38 - (void){{asCamelCased name}}:{{#chip_server_cluster_command_arguments}}{{#if (isFirstElement index)}}{{else}}{{asCamelCased label}}:{{/if}}({{asObjectiveCBasicType type}}){{asCamelCased label}} {{/chip_server_cluster_command_arguments}}completionHandler:(ResponseHandler)completionHandler;
40 - (void){{asCamelCased name}}:(ResponseHandler)completionHandler;
42 {{/chip_server_cluster_commands}}
44 {{#chip_server_cluster_attributes}}
45 - (void)readAttribute{{asCamelCased name false}}:(ResponseHandler)completionHandler;
46 {{#if (isWritableAttribute)}}
47 - (void)writeAttribute{{asCamelCased name false}}:({{asObjectiveCBasicType type}})value completionHandler:(ResponseHandler)completionHandler;
49 {{#if (isReportableAttribute)}}
50 - (void) configureAttribute{{asCamelCased name false}}:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval{{#unless (isDiscreteType)}} change:({{chipType}})change{{/unless}} completionHandler:(ResponseHandler)completionHandler;
51 - (void) reportAttribute{{asCamelCased name false}}:(ResponseHandler)reportHandler;
53 {{/chip_server_cluster_attributes}}
57 {{/chip_client_clusters}}
61 #endif /* CHIP_CLUSTERS_H */