@@ -184,14 +184,21 @@ extern NSString * const MTRArrayValueType;
184
184
resubscriptionScheduled : (MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled ;
185
185
186
186
/* *
187
- * Read attribute in a designated attribute path
187
+ * Reads the given attribute path from the device.
188
+ *
189
+ * nil values for endpointID, clusterID, attributeID indicate wildcards
190
+ * (e.g. nil attributeID means "read all the attributes from the endpoint(s) and
191
+ * cluster(s) that match endpointID/clusterID").
192
+ *
193
+ * A non-nil attributeID along with a nil clusterID will only succeed if the
194
+ * attribute ID is for a global attribute that applies to all clusters.
188
195
*/
189
- - (void )readAttributeWithEndpointID : (NSNumber * _Nullable)endpointID
190
- clusterID : (NSNumber * _Nullable)clusterID
191
- attributeID : (NSNumber * _Nullable)attributeID
192
- params : (MTRReadParams * _Nullable)params
193
- queue : (dispatch_queue_t )queue
194
- completion : (MTRDeviceResponseHandler)completion ;
196
+ - (void )readAttributePathWithEndpointID : (NSNumber * _Nullable)endpointID
197
+ clusterID : (NSNumber * _Nullable)clusterID
198
+ attributeID : (NSNumber * _Nullable)attributeID
199
+ params : (MTRReadParams * _Nullable)params
200
+ queue : (dispatch_queue_t )queue
201
+ completion : (MTRDeviceResponseHandler)completion ;
195
202
196
203
/* *
197
204
* Write to attribute in a designated attribute path
@@ -203,8 +210,8 @@ extern NSString * const MTRArrayValueType;
203
210
*
204
211
* @param completion response handler will receive either values or error.
205
212
*
206
- * Received values are an NSArray object with response-value element as described in
207
- * readAttributeWithEndpointID:clusterID:attributeID:queue:completion: .
213
+ * Received values are documented in the definition of
214
+ * MTRDeviceResponseHandler .
208
215
*/
209
216
- (void )writeAttributeWithEndpointID : (NSNumber *)endpointID
210
217
clusterID : (NSNumber *)clusterID
@@ -235,17 +242,24 @@ extern NSString * const MTRArrayValueType;
235
242
completion : (MTRDeviceResponseHandler)completion ;
236
243
237
244
/* *
238
- * Subscribe an attribute in a designated attribute path
245
+ * Subscribes to the given attribute path on the device.
246
+ *
247
+ * nil values for endpointID, clusterID, attributeID indicate wildcards
248
+ * (e.g. nil attributeID means "read all the attributes from the endpoint(s) and
249
+ * cluster(s) that match endpointID/clusterID").
250
+ *
251
+ * A non-nil attributeID along with a nil clusterID will only succeed if the
252
+ * attribute ID is for a global attribute that applies to all clusters.
239
253
*/
240
- - (void )subscribeAttributeWithEndpointID : (NSNumber * _Nullable)endpointID
241
- clusterID : (NSNumber * _Nullable)clusterID
242
- attributeID : (NSNumber * _Nullable)attributeID
243
- minInterval : (NSNumber *)minInterval
244
- maxInterval : (NSNumber *)maxInterval
245
- params : (MTRSubscribeParams * _Nullable)params
246
- queue : (dispatch_queue_t )queue
247
- reportHandler : (MTRDeviceResponseHandler)reportHandler
248
- subscriptionEstablished : (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished ;
254
+ - (void )subscribeAttributePathWithEndpointID : (NSNumber * _Nullable)endpointID
255
+ clusterID : (NSNumber * _Nullable)clusterID
256
+ attributeID : (NSNumber * _Nullable)attributeID
257
+ minInterval : (NSNumber *)minInterval
258
+ maxInterval : (NSNumber *)maxInterval
259
+ params : (MTRSubscribeParams * _Nullable)params
260
+ queue : (dispatch_queue_t )queue
261
+ reportHandler : (MTRDeviceResponseHandler)reportHandler
262
+ subscriptionEstablished : (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished ;
249
263
250
264
/* *
251
265
* Deregister all local report handlers for a remote device
@@ -279,9 +293,9 @@ extern NSString * const MTRArrayValueType;
279
293
@end
280
294
281
295
@interface MTRAttributePath : NSObject <NSCopying >
282
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * endpoint;
283
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * cluster;
284
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * attribute;
296
+ @property (nonatomic , readonly , copy ) NSNumber * endpoint;
297
+ @property (nonatomic , readonly , copy ) NSNumber * cluster;
298
+ @property (nonatomic , readonly , copy ) NSNumber * attribute;
285
299
286
300
+ (instancetype )attributePathWithEndpointID : (NSNumber *)endpointID
287
301
clusterID : (NSNumber *)clusterID
@@ -292,9 +306,9 @@ extern NSString * const MTRArrayValueType;
292
306
@end
293
307
294
308
@interface MTREventPath : NSObject
295
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * endpoint;
296
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * cluster;
297
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * event;
309
+ @property (nonatomic , readonly , copy ) NSNumber * endpoint;
310
+ @property (nonatomic , readonly , copy ) NSNumber * cluster;
311
+ @property (nonatomic , readonly , copy ) NSNumber * event;
298
312
299
313
+ (instancetype )eventPathWithEndpointID : (NSNumber *)endpointID clusterID : (NSNumber *)clusterID eventID : (NSNumber *)eventID ;
300
314
@@ -303,9 +317,9 @@ extern NSString * const MTRArrayValueType;
303
317
@end
304
318
305
319
@interface MTRCommandPath : NSObject
306
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * endpoint;
307
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * cluster;
308
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * command;
320
+ @property (nonatomic , readonly , copy ) NSNumber * endpoint;
321
+ @property (nonatomic , readonly , copy ) NSNumber * cluster;
322
+ @property (nonatomic , readonly , copy ) NSNumber * command;
309
323
310
324
+ (instancetype )commandPathWithEndpointID : (NSNumber *)endpointID clusterID : (NSNumber *)clusterID commandID : (NSNumber *)commandID ;
311
325
@@ -314,25 +328,27 @@ extern NSString * const MTRArrayValueType;
314
328
@end
315
329
316
330
@interface MTRAttributeReport : NSObject
317
- @property (nonatomic , readonly , strong , nonnull ) MTRAttributePath * path;
331
+ @property (nonatomic , readonly , copy ) MTRAttributePath * path;
318
332
// value is nullable because nullable attributes can have nil as value.
319
- @property (nonatomic , readonly , strong , nullable ) id value;
333
+ @property (nonatomic , readonly , copy , nullable ) id value;
320
334
// If this specific path resulted in an error, the error (in the
321
335
// MTRInteractionErrorDomain or MTRErrorDomain) that corresponds to this
322
336
// path.
323
- @property (nonatomic , readonly , strong , nullable ) NSError * error;
337
+ @property (nonatomic , readonly , copy , nullable ) NSError * error;
324
338
@end
325
339
326
340
@interface MTREventReport : NSObject
327
- @property (nonatomic , readonly , strong , nonnull ) MTREventPath * path;
328
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * eventNumber; // chip::EventNumber type (uint64_t)
329
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * priority; // chip::app::PriorityLevel type (uint8_t)
330
- @property (nonatomic , readonly , strong , nonnull ) NSNumber * timestamp; // chip::app::Timestamp.mValue type (uint64_t)
331
- @property (nonatomic , readonly , strong , nullable ) id value;
341
+ @property (nonatomic , readonly , copy ) MTREventPath * path;
342
+ @property (nonatomic , readonly , copy ) NSNumber * eventNumber; // EventNumber type (uint64_t)
343
+ @property (nonatomic , readonly , copy ) NSNumber * priority; // PriorityLevel type (uint8_t)
344
+ @property (nonatomic , readonly , copy ) NSNumber * timestamp; // Timestamp type (uint64_t)
345
+ // An instance of one of the event payload interfaces.
346
+ @property (nonatomic , readonly , copy ) id value;
347
+
332
348
// If this specific path resulted in an error, the error (in the
333
349
// MTRInteractionErrorDomain or MTRErrorDomain) that corresponds to this
334
350
// path.
335
- @property (nonatomic , readonly , strong , nullable ) NSError * error;
351
+ @property (nonatomic , readonly , copy , nullable ) NSError * error;
336
352
@end
337
353
338
354
NS_ASSUME_NONNULL_END
0 commit comments