3 * Copyright (c) 2021 Project CHIP Authors
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 // THIS FILE IS GENERATED BY ZAP
20 #ifndef CHIP_CLUSTERS_H
21 #define CHIP_CLUSTERS_H
23 #import <Foundation/Foundation.h>
27 typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
29 NS_ASSUME_NONNULL_BEGIN
33 * This is the base class for clusters.
35 @interface CHIPCluster : NSObject
37 - (nullable instancetype)initWithDevice:(CHIPDevice *)device
38 endpoint:(uint8_t)endpoint
39 queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER;
40 - (instancetype)init NS_UNAVAILABLE;
41 + (instancetype)new NS_UNAVAILABLE;
49 @interface CHIPOnOff : CHIPCluster
51 - (void)off:(ResponseHandler)completionHandler;
52 - (void)on:(ResponseHandler)completionHandler;
53 - (void)toggle:(ResponseHandler)completionHandler;
55 - (void)readAttributeOnOff:(ResponseHandler)completionHandler;
56 - (void)configureAttributeOnOff:(uint16_t)minInterval
57 maxInterval:(uint16_t)maxInterval
58 completionHandler:(ResponseHandler)completionHandler;
59 - (void)reportAttributeOnOff:(ResponseHandler)reportHandler;
60 - (void)readAttributeClusterRevision:(ResponseHandler)completionHandler;
66 #endif /* CHIP_CLUSTERS_H */